• #21565
    Salesforce | Uday Uday #15

    Salesforce Trigger order of execution

    If any field update of workflow again before trigger and after trigger fire one more time, but i don’t want to fire one more time before tigger and after trigger.How can i controll order of execution

    Tagged: , , , ,

    #21573
    Salesforce | Aman Aman #6

    Hello Uday,

    you can try this :

    trigger Handler :

    public class triggerHandler {
    public static boolean fact=true;

    }

    trigger :

    trigger ContactUp on Contact (after insert,after update) {
    if(triggerHandler.fact==true ){
    triggerHandler.fact=false;
    List<Contact> li123=[select id from contact where id in :trigger.new];
    system.debug(‘####################’);
    for(contact con :li123){
    con.description =’aaaaaaaaaaaaaaaa’;
    }
    update li123;
    }
    }

Viewing 2 posts - 1 through 2 (of 2 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending
Property of Forcetalks.com
Copyright 2017 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?