Automatically change BPF stage in JavaScript
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.

Like
Report
*This post is locked for comments