Ads

Monday, 15 April 2013

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
        ............................
        ............................
        ............................
        }

}

No comments:

Post a Comment