This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Will Below Query Work? Explain. select Count(id), Name, Address__c From Opportunity Group By Name |
|
Answer» Above query will throw an ERROR. EXPLANATION: In Group by clause the columns selected must be either used in Group by clause or in aggregate functions. The Name field is NEITHER used in aggregate methods and in group by clause and hence will result in error “Malformed Query”. Above query will throw an error. Explanation: In Group by clause the columns selected must be either used in Group by clause or in aggregate functions. The Name field is neither used in aggregate methods and in group by clause and hence will result in error “Malformed Query”. |
|
| 2. |
You Want To Display The Encrypted Field On Visualforce And You Are Using Component Apex:outputtext. Will It Work For Encrypted Fields? |
|
Answer» Encrypted custom fields that are embedded in the <APEX:outputText> component display in clear text. The <apex:outputText> component doesn’t RESPECT the View Encrypted Data permission for users. To prevent showing sensitive information to UNAUTHORIZED users, USE the <apex:outputField> tag instead. Encrypted custom fields that are embedded in the <apex:outputText> component display in clear text. The <apex:outputText> component doesn’t respect the View Encrypted Data permission for users. To prevent showing sensitive information to unauthorized users, use the <apex:outputField> tag instead. |
|
| 3. |
How To Display The Formatted Number / Date In Visual Force? Which Component Should Be Used? |
|
Answer» Use component “<apex:outputText>”. Example : FORMAT the number into currency. <apex:outputtext VALUE="{0, number, 000,000.00}"> <apex:param value="{!valFromController}" /> </apex:outputtext> OR <apex:outputtext value="{0, number, ###,###.00}"> <apex:param value="{!valFromController}" /> </apex:outputtext> Use component “<apex:outputText>”. Example : Format the number into currency. <apex:outputtext value="{0, number, 000,000.00}"> <apex:param value="{!valFromController}" /> </apex:outputtext> OR <apex:outputtext value="{0, number, ###,###.00}"> <apex:param value="{!valFromController}" /> </apex:outputtext> |
|
| 4. |
It May Happen That Above Tips Will Not Work As Lots Of Time The Page Header Already Set. Then, How To Achieve Same Result Using Apex? |
|
Answer» Add below LINE of CODE in APEX (CONSTRUCTOR) Add below line of code in Apex (Constructor) |
|
| 5. |
If Ie9 Is Not Working With Your Custom Visualforce Page Then How To Tell Your Visualforce Code To Run In Ie8 Compatibility Mode? |
|
Answer» ADD following metatag to PAGES: <meta http-equiv="X-UA-Compatible" CONTENT="IE=EmulateIE8" /> Add following metatag to pages: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /> |
|
| 6. |
Onchange Event Does Not Work With <apex:actionsupport> In Ie9. How To Resolve This Error? |
|
Answer» If we add the HEADER on Visualforce page then it CREATES lots of problem in IE9. I think there are few java-script LIBRARY loaded by Header of SALESFORCE which makes IE9 compatible. So the best solution is to enable the Header by using “showHeader=true” in Apex page. If we add the Header on Visualforce page then it creates lots of problem in IE9. I think there are few java-script library loaded by Header of Salesforce which makes IE9 compatible. So the best solution is to enable the Header by using “showHeader=true” in Apex page. |
|