Activity Forums Salesforce® Discussions What are the considerations while implementing the Triggers in salesforce?

  • What are the considerations while implementing the Triggers in salesforce?

    Posted by Mansi on April 30, 2021 at 3:25 pm

    What are the considerations while implementing the Triggers in salesforce?

    CRMJetty replied 2 years, 8 months ago 4 Members · 3 Replies
  • 3 Replies
  • Rajesh

    Member
    May 4, 2021 at 7:35 am

    Various Considerations while implementing triggers in Salesforce are:
    -Upsert triggers fire both before and after insert or before and after update triggers as appropriate.-Merge triggers fire both before and after delete for the losing records, and both before and after update triggers for the winning record.
    -See Triggers and Merge Statements.Triggers that execute after a record has been undeleted only work with specific objects.
    -See Triggers and Recovered Records.Field history is not recorded until the end of a trigger. If you query field history in a trigger, you don’t see any history for the current transaction.
    -Field history tracking honors the permissions of the current user. If the current user doesn’t have permission to directly edit an object or field, but the user activates a trigger that changes an object or field with history tracking enabled, no history of the change is recorded.
    -Callouts must be made asynchronously from a trigger so that the trigger process isn’t blocked while waiting for the external service's response.
    -The asynchronous callout is made in a background process, and the response is received when the external service returns it. To make an asynchronous callout, use asynchronous Apex such as a future method. See Invoking Callouts Using Apex for more information.

  • kishan

    Member
    May 11, 2021 at 7:39 am
  • CRMJetty

    Member
    April 11, 2022 at 6:10 am

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos