web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

What is alternate option of Business Process Flow in Dynamics 365 online

(0) ShareShare
ReportReport
Posted on by 125

We have requirement to save first tab of crm form before going into next tab without using business process flow. 

I have the same question (0)
  • Suggested answer
    Naveen Ganeshe Profile Picture
    3,397 User Group Leader on at

    Hi Poonam,

    You can add on-change events on the tabs and loop through to check the required fields. If the value is not provided for the field then restrict the user to navigate to next tab.

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    By default hide second tab from the form editor.

    Now add javascript code on onsave event handler to check if first tab data is entered then show second tab.

  • Suggested answer
    Eiken Profile Picture
    Microsoft Employee on at

    Hi,

    You can refer to the following JavaScript code.

    var Acc = {};
    Acc.formEvents = {
        form_load: function (e) {
           var fc = e.getFormContext();
           // use the below code to remove a registered event handler.
           //fc.data.process.removeOnPreStageChange(Acc.formEvents.handlePreStage);
           fc.data.process.addOnPreStageChange(Acc.formEvents.handlePreStage);
        },
    
        handlePreStage: function (e) {
          //  debugger;
           // get the event arguments
           var bpfArgs = e.getEventArgs();
           var ageValue= e.getFormContext().getAttribute("crd9d33_age").getValue()
    
    
    
    
    
          if (bpfArgs.getDirection() === "Next" && ageValue==null) { // only next stage movement is allowed. You can stop it depending on custom business logic as well
              // stop the stage movement
              bpfArgs.preventDefault();
              alertStrings = { confirmButtonLabel: "OK", text: "Next stage movement is not allowed", title: "Sample title" };
              alertOptions = { height: 120, width: 260 };
              Xrm.Navigation.openAlertDialog(alertStrings, alertOptions);
              return;
           }
           // you can also play with the other properties of eventargs
           // get the stage - bpfArgs.getStage();
           // get the steps - bpfArgs.getStage().getSteps();
        }
    };

    Add  On-Load event to the form.

    pastedimage1674122049144v1.png

    In my test, the prompt box will pop up if the age field is not filled in and will prevent you to move on to the next stage.

    pastedimage1674122082437v2.png

  • Poonam Profile Picture
    125 on at

    We have nested business rules, and plugins which runs depends on tab [A],[B] and few related entity.

  • Poonam Profile Picture
    125 on at

    We have few nested business rules which are depends on other tab's data, and we have few plugins too. I am not sure how everything will fit in JavaScript.  

  • Poonam Profile Picture
    125 on at

    This is perfect, but my problem is our client don't want to have business process flow in our app.

  • Suggested answer
    Amit Katariya007 Profile Picture
    10,409 Moderator on at

    U can show hide different tabs as per your requirement. else you can add multiple sections on the same tab and then you can show hide it....

    Thank you,

    Amit Katariya

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Subra Profile Picture

Subra 146

#2
BillurSamdancioglu Profile Picture

BillurSamdancioglu 85 Most Valuable Professional

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 84 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans