Hi, I am facing an issue on the change stage of BPF.
My scenario is: I'm making an approval process using BPF. So I want to move stages and update BPF accordingly. So for instance, there are 2 Persons involved in the approval process. Person A and B. Now if A approves (approval is an option set) then the stage moves to the next stage and Person B is now responsible for the approval. Now if person B rejects, then the stage would reset to the starting stage i.e. person A's stage. Now the problem is, we are setting the active stage after checking if the person B's approval optionset is set to rejected, and then saving the form explicitly. So what it does now is we have to click 2 times in order to make the expected change. We are doing this in JS and using addOnPreStageChange() and we are preventing the default behavior which moves it to next stage. Kindly refer to the code and screenshots below for better understanding.
Code:
function HideStageButton(executionContext){
var formContext = executionContext.getFormContext();
formContext.data.process.addOnPreStageChange(StageChange);
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156