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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Automatically change BPF stage in JavaScript

Charles Abi Khirs Profile Picture Charles Abi Khirs 3,569

In this previous post, we saw different event handlers related to the BPF. In this post, we will talk about two methods that you might need to automatically change the BPF stage that will be directly applied in the UI in real-time using JavaScript.

In order to achieve this, you have to use the methods formContext.data.process.moveNext and formContext.data.process.movePrevious so you can move back and forth in the active BPF of the form.



    function moveBPFToNextStage(context) {

        var formContext = context.getFormContext();

        formContext.data.process.moveNext();

    }

    function moveBPFToPreviousStage(context) {

        var formContext = context.getFormContext();

        formContext.data.process.movePrevious();

    }


Bonus Tip:

If you make a change that is not saved yet, the BPF stage will not be changed. Therefore, call the save method in the JavaScript and then move the stage.


Hope This Helps!


This was originally posted here.

Comments

*This post is locked for comments