Questions
Questions
Questions
3.
4.
5.
6.
7.
8.
9. Compare and contrast custom controllers and controller extensions. How are they are same?
How are they different?
Ans:
A custom controller is an apex class that implements all the logic for a page without
leveraging the functionality of a standard controller.
In other words, controller extension is an apex class which adds functionality to existing
standard and custom controllers.
Sharing setting is applied on standard object/extension by default; In case we dont
want to apply sharing setting in code then Custom controller is only option.
A Visualforce can have a single Custom controller or standard controller but many
controller extensions.
10. What identifies a controller as being an extension?
Ans: Topic not covered
11. What kind of content can be included in a Visualforce page?
Ans:
VF Tags
Force.com merge Tags
HTML
Java
12. What are attributes? What is the syntax for including them?
Ans: Attributes are modifiers to the main tag that belong after the tag name in the start tag.
The syntax is attributeName=attributeValue
13. Which tag is used with both radio buttons and picklists to create the selectable values?
Ans:
<apex:selectList../> tag
14. What is the main difference between using dataTable vs. pageBlockTable tags?
Ans:
PageBlock: For default salesforce standard format.
dataTable:To design customformats
15. What are the different AJAX action tags? What does each do?
Ans: Not Covered
16. What are the Global Key words?
Ans:
Used to access various values from components on a page or from user objects or from URL, for
each object we have each key word.
URL Current Page
Profile Page Reference
User Object Type
Resource Component
17. What are the Gov Limits in Salesforce.com?
Ans:
18. What is the biggest difference between Apex and most programming languages?
Ans:
19. How would an external program access functionality on Force.com platform?
Ans: By using External Id
20. How do you override a method in Apex?
Ans: Using Controller Extensions.
21. What are the ways in which Apex can be invoked?
Ans:
Triggers
Apex Schedule
Anonymous Blocks
22. What is the difference between the global and public access modifier keywords?
Ans:
Global modifier can be accessed anywhere in Apex class
Public modifier can be accessed in outside Apex class also
23. What special characters are used to surround SOQL or SOSL queries?
Ans: % ,AND,WHERE,LIKE can be used in SOQL and SOSL queries
24. Explain About wrapper class and wrapper class example?
Ans: A wrapper class is a class whose instances are collections of other objects.
25. . Explain about Apex Triggers, Give 2 Examples with scenarios?
Ans: Trigger is a piece of code that is executed before or after a particular field of certain type is
inserted, updated or deleted.
Eg: trigger assigndefaultvalue on Account (before insert,before update)
{
for(Account a : trigger.new)
{
if(a.accountnumber == null)
a.accountnumber ='12345678';
if(a.phone == null)
a.phone.adderror('Please enter phone');
}
}