Skip to main content
5 respuestas
  1. 3 mar 2017, 10:28
    Hi AdminBooster,

    Before vs After 

    Basically before triggers are executed before the data is commited to the database .

    You can change the field value in before trigger and need not commit it, salesforce will automatically commit it

    You can validate the record and make a record not available to save in before trigger

    Fields like Id are not accessible in this trigger.

    After Trigger:

    After trigger works after the data is commited to the database

    Fields like Id are accessible in this trigger.

    If changes are made in this trigger , You should manually commit this to the database

    Insert and Update :

    Insert works when a record is inserted while update works when a record is updated .

    Upsert will call both the update and insert trigger

    Thanks and Regards,

    Shiva RV
0/9000