Salesforce Interview Question and answers for Developers Part 9


49. What is the significance of master detail relationship?
Ans - Master detail relationship can be set by creating master detail field on the detail object. In master detail relationship whenever a master detail record is deleted the detail records are also deleted. When creating a detail record it is mandatory that the master field is populated with a value(i.e master field is mandatory) It is also mandatory that this field is kept on pagelayout. A standard object can never be set as detail object. With master detail relationship roll up summary fields can be created on master object.

50. What is trigger recurssion and how can you you avoid it?
Ans - If an exceting trigger calls itself then it goes to into infinite loop and is called recursion. If a trigger on a particular object executing on a particular dml does the same dml on that object then the same trigger would be called and it will go into recursion. A static variable can be set in a class before executing the trigger to avoid the recursion.


51. What is an external id?
A external id is field that can be used as a reference while updating records. If the data is coming from an external system then the unique field that the external system has could be used as an external id within salesforce. External id can be used while upserting records within salesforce using data loader. There is a limit on the number external ids you can have in an object.

52. What are governers limit and what is its significance?
Ans - Governers limit is a limit that salesforce enforces on every code execution so as to avoid monopoly by any single org. Since the resources are shared across organisation governer limit checks on the resource utilisation. Number of limits are imposed limit 100 soql query exception, 50000 rows can be fetched using soql etc


53. Why one should not put a soql or a dml within for loop?
Ans - Putting soql or dml in for loop can easily hit the governer limit hence we should not put them in for loop. Only 100 soql are allowed in one transaction and only 150 dmls are allowed.

54. What are the various collections available in salesforce?
Ans - In salesforce along with primitive data types and sObjects there are collections. Apex uses following collections as below
    List - stores duplicate values which are ordered.
    Set - stores unique values which are unordered
   Map - consists of keys and values

6 comments:

  1. Thanks for sharing the descriptive information on Salesforce course. It’s really helpful to me since I'm taking Salesforce training. Keep doing the good work and if you are interested to know more on Salesforce, do check this Salesforce tutorial.https://www.youtube.com/watch?v=2hR0H2nxA4I

    ReplyDelete
  2. Wonderful post!!Thank you for sharing this info with us.
    Keep updating I would like to know more updates on this topic
    Very useful content, I would like to suggest this blog to my friends.

    Salesforce Training
    Salesforce Course in Chennai

    ReplyDelete
  3. Thanks for sharing with us your wisdom.This will absolutely going to help me in my projects .

    Cloud Computing Courses in Chennai

    cloud training in chennai

    ReplyDelete
  4. I really appreciate for this great information, This type of message always inspiring and I prefer to read quality content. so happy to find good place to many here in the post. the writing is just great. thanks for the post.sales pop by autoketing sale notification app

    ReplyDelete