Salesforce Interview Questions Part#5
1. Difference between Sandbox and Development environment?
2. How to schedule export or take the backup of salesforce?
3. Do governor limits apply to sandbox instances?
Ans : Governor limits do apply to all Salesforce instances (trial, developer, production or sandbox environments). However code coverage and successful execution of test classes is only enforced when deploying to a production environment.
4. What is Roll up summary field in Salesforce?
Ans : Roll up summary field in salesforce calculates the Count, Sum, Min or Max of particular field of any child record. Thus, we can say that Roll up summary field can only be created on Master object.
5. How many types of the relationship fields available in Salesforce>
Many to Many
6. How to create many to many relationships between object.
Creating many to many relationship in salesforce is little tricky. You cannot create this type of relationship directly. Follow below steps to create this type of relationship. Create both objects which should be interlinked.
Create one custom object, which should have autonumber as unique identification and create two master relationships for both objects, no need create tab for this object. Now on both object, add this field as related list.
7. If one object in Salesforce have 2 triggers which runs “before insert”. Is there any way to control the sequence of execution of these triggers?
Ans : Salesforce.com has documented that trigger sequence cannot be predefined. As a best practice create one trigger per object and use comment blocks to separate different logic blocks. By having all logic in one trigger you may also be able to optimize on your SOQL queries.
8. How to delete the User from Salesforce?
Ans : As per now, salesforce does not allow to delete any user, however you can deactivate the user.
9. How to delete the users data from Salesforce?
Ans : To delete the Users Data go to Setup | Administration Setup | Data Management | Mass Delete Record, from there select the objects like Account, Lead etc and in criteria select the users name and delete all records of that user related to particular object.
10. How to restrict the user to see any record, lets say opportunity?
Ans : set up opportunity sharing to be private. If both users are admins or have view all records on opportunity, then that overrides private sharing.
11. What is the difference between trigger.new and trigger.old in Apex – SFDC?
Returns a list of the new versions of the sObject records. Note that this sObject list is only available in insert and update triggers, and the records can only be modified in before triggers.
Returns a list of the old versions of the sObject records. Note that this sObject list is only available in update and delete triggers.
12. How to restrict any Trigger to fire only once ?