There is a master-detail relationship between two objects and I want to ensure that the master object should not have more than 10 child records. How



There is a master-detail relationship between two objects and I want to ensure that the master objec..

Answer / Virendra Kumar Shukla

To enforce this limitation, create a trigger on the master object that checks the number of related child records before an insert or update operation. If the count exceeds 10, throw an exception and rollback the transaction to prevent the operation from proceeding.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

Is it possible to convert master-detail relationship to look up relationship?

1 Answers  


What are differences between workflows and approval process?

1 Answers  


Define sandbox.org. Name different sandbox types.

1 Answers  


Can we create master detail relationship on existing records? : salesforce admin

1 Answers  


Explain what is the trigger?

1 Answers  


What is a data type in salesforce?

1 Answers  


Is it possible to schedule a dynamic dashboard?

1 Answers  


What is protocal? : salesforce integration

1 Answers  


Explain Trigger events? & context variables?

1 Answers   Accenture,


What is json? : salesforce integration

1 Answers  


Which parts of lightning components are server-side and which are client-side ? : salesforce lightning component

1 Answers  


What are trend reports?

1 Answers  


Categories