Salesforce Interview Questions with Answers Part 36

1. In a Master-Detail relationship how can we prevent duplicate child records under the same master?

Develop a trigger on child object with before insert event. Use Map data type iterating over the trigger.new list. In the next iteration find whether for the same master, duplicate is found.

2. Consider a scenario where we need to update 100,000 records daily. How can we do it?

Batch Apex with Scheduler class to schedule daily.

3. How can we avoid hard coding values in Salesforce?

Custom Label, Custom Settings, Custom Metadatatype.

4. Can we expose/provide access to a VisualForce page to users who do not have a salesforce login/who are not salesforce users? If so, how can we do it?

Force.com Site.

5. How can we load large amount of options on a Picklist field?

With Winter '16 you can add up to 500 values to a custom multi-select picklist, more than three times as many as before. This feature is available in both Lightning Experience and Salesforce Classic.

6. Suppose if we want to provide some of the System Admin access to a group of users, how can we do it?


Cheers!!!

No comments:

Post a Comment