Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum

Navigate Business Process Flow - dependent on Current Tab

Posted on by 50
Hello I when I select a tab on my form, I want it to coordinate with the business process flow.  The JavaScript below does not seem to work when navigating forward (selecting a tab ahead), but when I navigate backwards a step or two then the business process flow moves with it.  Any reason why I can't navigate forward?  None of the fields are set to required/are all filled out.  I want to be able to navigate back and forth between tabs and have the business process flow move with it.
 
function synchronizeTabAndBPF(executionContext) {
    var formContext = executionContext.getFormContext();
    var activeTab = getActiveTabName();
    // Switch business process flow based on active tab
    switch (activeTab) {
        case /tab_1/:
            formContext.data.process.setActiveProcess(/BPF1/);
            break;
        case /tab_2/:
            formContext.data.process.setActiveProcess(/BPF2/);
            break;
        // Add cases for other tabs and corresponding BPFs
        default:
            break;
    }
}

 
Thanks for any help!
Categories:
  • Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Navigate Business Process Flow - dependent on Current Tab
    Hi Partner,
    If you want to execute function when tab change, you need consider using addTabStateChange() function.
    --This event occurs when the DisplayState of the tab changes due to user interaction or when the setDisplayState method is applied in code.
    Maybe you can refer to the following blog for more details:

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,353 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,251 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans