trigger.isInsert and trigger.isUpdate

trigger.isInsert is true when a new record is created and inserted.

trigger.isUpdate is true when an existing record is modified.

Example:
trigger memberInviteNotify on Member__c (after insert,after update)
{
if(trigger.isInsert)
{
// When a new record is created and inserted, the flow will come here
……………………….
}
if(trigger.isUpdate)
{
// When an existing record is modified, the flow will come here
……………………….
}
}

Written by 

2x Salesforce MVP | Platform Champion | 18x Salesforce Certified | MuleSoft Certified | 8x Trailhead Ranger | TechForce Services | Sydney | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *

*