• #21565
    Salesforce | Uday Uday #17
    Forcetalks

    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 #8
    Forcetalks

    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

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

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

Log in with your credentials

or    

Forgot your details?