Implementing the Triggers in Salesforce

 

  • Upsert triggers fire each before and once insert or before and after update triggers as applicable.
  • Merge triggers fire each before and after delete for the losing records, and both before and after update triggers for the winning record. 
  • Triggers that execute once a record has been undeleted only work with specific objects. 
  • Field history not records till the top of a trigger.


  • Field history tracking provides the liberty or permissions of the current user. If this user doesn’t have permission to directly edit an object or field. However, the user activates a trigger that changes an object or field with history tracking enabled, no history of the change record.
  • Callouts should be created asynchronously from a trigger so that the trigger method isn’t blocked while looking ahead to the external service’s response. The asynchronous callout is created in an exceeding background process, and also the response is received once the external service returns it. To form an asynchronous callout, use asynchronous Apex such as a future method.

Comments

Popular posts from this blog

General Interview Questions and Answers

20 Performance Testing Interview Questions and Answers

Leadership: a Definition