Hi All,
I am trying to move stages dynamically in BPF using JS.
The OOB setStage and movenext is creating issue as the response is always the dirty\invalid.
//So i am using the script
Xrm.Page.getAttribute("stageid").setValue(stageGUID);
//after next i am calling the save method.
Xrm.Page.entity.save();
I can see the stage is moving but not in active, it is active only after the page is refresh.
I have added refresh as below
Xrm.Page.data.save().then
(function () {
// Refresh
},
function () {
// Alert
}
);
If i use the above the page, then every time stage moved by the above js the confirmation popup is showing to move away from the page or stay back in the same page.
///////////////// Final Code /////////////////
Xrm.Page.getAttribute("stageid").setValue(stageGUID);
Xrm.Page.data.save().then
(function () {
// Refresh
},
function () {
// Alert
}
);
Please let me know the wrong side of my code and assist me in correction.
Thanks
Vijji
Thanks & Regards Vijji