You need to sign in to do that
Don't have an account?
KS Kumar
Triggers question
When the same operation can be done with
before Insert Trigger or after Insert Trigger which you
prefer and why
before Insert Trigger or after Insert Trigger which you
prefer and why
Karanraj
Its depend upon what action you are trying to perform. Example If you are trying the update the values of the record which you inserted then go for the before insert operation becuase record is not saved in database so you can set your value without making any DML statements in your code. Check this Apex Trigger module in Trailhead to understand more about Trigger logic - https://developer.salesforce.com/trailhead/module/apex_triggers
KS Kumar
Thank you
Pavan B
In before insert operation we dont have the Id of the record ,where that is possible in After insert operation