I am moving a business process flow to next stage when a field value is changed
In the on change event of a field I am calling the below function
function caseStatusChange(){ try{ console.log("trying to change"); parent.Xrm.Page.data.process.moveNext(nextStage()); //parent.Xrm.Page.data.process.setActiveStage("d2697a8d-5327-db01-06e6-6557aebe3b8a",nextStage); } catch(ex){ console.log("error in stage movement"); } }; function nextStage(){ console.log(" case moved to next stage"); }
The code works only when I change the value from some other value back to default value. For example if the default value is Yes, it works only when I change it to "No" and then change it back to "Yes"
In other cases it throws error "Refused to set unsafe header". Even when I change it to "Yes" it throws the error, but it moves the process to next stage