salesforce.com interview questions and answers 11

Part 1 (1-15) - Part 2 (16 -30) - Part 3 (31 -45) - Part 4 (46 -55) - Part 5 (56 -66) - Part 6 (67 - 78) - Part 7 (79 - 90) - Part 8 (91 - 100) - Part 9 (101- 111) - Part 10 (112 - 120) - Part 11 (121 - 130) - Part 12 (131 - 137) - Part 13(138 - 145) - Part 14 (146 - 152) - Part 15 ( 153 - 159)  - Part 16 ( 160 - 168) Part 19 (188 - 201)

121. Expand SOQL and SOSL.
Ans - SOQL- salesforce object query language, SOSL - salesforce object search language.

122. What is the difference between soql and sosl?
Ans - SOQL can query records from a single object at a time, while sosl can query records from multiple objects. SOQL returns a list while SOSL returns list of lists.

 
123. How can you query all records using an soql statement?
Ans - This can be done using ALL ROWS keyword. This queries all records including deleted records i recyclebin.

124. What is the use of @future annotation?
Ans - Using @future annotation with a method executes it whenever salesforce has resources available.

 

125. What are the different access modifiers that can be used with methods and variables?
Ans - Global, Public, private and protected

126.  What is the significance of static keyword?
Ans - Methods, variables when defined as static are initialised only once when class is loaded. Static variables are not transmitted as part of view state for a visualforce page.

 

127. Can custom setting be accessed in a test class?
Ans -  Custom setting data is not available default in a test class. We have to set seeAllData parameter true while definig a test class as below.
          @isTest(seeAlldata=true)

128. What is the difference between role and profile?
Ans - Role defines record level access while profile defines object level access.

 
129. On which objects can you create Queues?
Ans - Queues can be created on two standard objects (Lead and case) and also on all custom objects.
130. What are the different ways to invoke apex code?
Ans - Apex code can be invoked using DML operation(trigger), Apex class can be scheduled using schedulable interface(ex. batch apex), apex code can be run through developer console, an apex class can be associated with a visualforce page
.


Part 1 (1-15) - Part 2 (16 -30) - Part 3 (31 -45) - Part 4 (46 -55) - Part 5 (56 -66) - Part 6 (67 - 78) - Part 7 (79 - 90) - Part 8 (91 - 100) - Part 9 (101- 111) - Part 10 (112 - 120) - Part 11 (121 - 130) - Part 12 (131 - 137) - Part 13(138 - 145) - Part 14 (146 - 152) - Part 15 ( 153 - 159)- Part 16 ( 160 - 168) Part 19 (188 - 201)

No comments:

Post a Comment