Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Switch Business Process Flow through JavaScript Web Resource

Posted on by 295

Hello Everyone !

Hope all of you fine!

Can any anyone tell me how to switch BPF through JS when form load?

I am beginner as JS developer in Dynamics.

*This post is locked for comments

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Switch Business Process Flow through JavaScript Web Resource

    Hi ,

    Check with this  -

    function OnloadForm(Executioncontext)
    {
        var formcontext = Executioncontext.getFormContext();
        formContext.data.process.setActiveProcess(processId, callbackFunction); // Pass GUID of process 
    }
    
    function callbackFunction(result)
    {
        if(result == "Success")
        {
            alert("Success");
        }
        else
        {
            alert("failed");
        }
    
    }


  • Verified answer
    Joana Pinto Profile Picture
    Joana Pinto 740 on at
    RE: Switch Business Process Flow through JavaScript Web Resource

    Hello,

    This link refers to the new client-side api for v9 of Dynamics 365:

    docs.microsoft.com/.../setactiveprocess

    Hope it helps!

  • RE: Switch Business Process Flow through JavaScript Web Resource

    Hello!

    The references which you given are old. Now i heard that Microsoft has changed JavaScript architecture for dynamics due to which controls have changed. When i use methods in which are given in documentation of Microsoft so errors occur so kindly tell me updated reference for this.

  • Verified answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans