SalesforceApex Triggers


Syntax

  • trigger <name> on <object-api-name> (<events>) { // your trigger logic }

Parameters

parameterdescription
nameName of the trigger
object-api-nameObject on which the trigger will fire. Can be any standard or custom object.
eventsEvents which will fire the trigger. Are a combination of either before/after with any of insert/update/delete. There's also after undelete without before counterpart.