Skip to main content

Notifications

Announcements

No record found.

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. 

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 10,089 Super User 2025 Season 1 on at
    RE: What is alternate option of Business Process Flow in Dynamics 365 online

    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

  • Poonam Profile Picture
    Poonam 125 on at
    RE: What is alternate option of Business Process Flow in Dynamics 365 online

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

  • Poonam Profile Picture
    Poonam 125 on at
    RE: What is alternate option of Business Process Flow in Dynamics 365 online

    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
    Poonam 125 on at
    RE: What is alternate option of Business Process Flow in Dynamics 365 online

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

  • Suggested answer
    Eiken Profile Picture
    Eiken on at
    RE: What is alternate option of Business Process Flow in Dynamics 365 online

    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

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: What is alternate option of Business Process Flow in Dynamics 365 online

    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
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: What is alternate option of Business Process Flow in Dynamics 365 online

    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.

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans