Monday, October 28, 2019

WHAT IS APEX TRIGGER IN SALESFORCE?

Apex triggers are used to manage records in Salesforce. It enables us to perform operations before or after the event is completed. In the “before event” we generally perform validations to prevent wrong entry into the database. In the “after event” we perform operations such as creating or updating a related record. The trigger is a very powerful mechanism using which we can do operations such as executing SOQL, executing DML operations, calling apex class methods.


TRIGGER SYNTAX:


trigger triggerName on objectName (trigger events) {
   // Block of code
}


No comments:

Post a Comment