I am working with Dynamics 365 Business Process Flows and I want to move to the next stage using JavaScript. The stage moves successfully, but I also want to pass one or more parameters to Dataverse when the stage changes.
Here is the code I have tried:
Xrm.Page.data.process.moveNext(function (result) {
console.log("Stage moved.");
});
formContext.getAttribute("new_parameter").setValue("test");
formContext.data.entity.save();
The parameter value is NOT being saved in Dataverse after BPF stage change.
No error appears in console.
Expected Behavior:
Stage should move
Parameter value should be saved in Dataverse