What are the trigger best practices?



What are the trigger best practices?..

Answer / Jayant Sachan

Trigger best practices in Salesforce include: limiting triggers to no more than 100 lines of code, minimizing the number of DML statements per trigger, using asynchronous processing with Future methods or Queueable Apex when appropriate, and properly handling exceptions and errors.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

How will you test your code through Sandbox?

1 Answers   Deloitte,


What is the time-dependent workflow?

1 Answers  


What will happen if you try to update record in after trigger context?

1 Answers  


What is group by?

1 Answers  


Can call apex class method on the fly (dynamically)?

1 Answers  


What is the purpose of <script> tags? : salesforce visualforce

1 Answers  


What are charts?

1 Answers  


Validation rules, what are they use for in salesforce?

1 Answers  


When to use public class and when to use global class?

1 Answers  


What is a difference between System log and debug log?

1 Answers   Cognizant,


Is lightning an mvc framework ? : salesforce lightning component

1 Answers  


Can we create a dashboard using Visual-force page? and what all the components we use here?

1 Answers   Cap Gemini,


Categories