Hi!
We have the following code that runs when we click a button:
function followUpTask(duration) {
debugger;
//check for not saved form
if (Xrm.Page.ui.getFormType() == 1 && followup == false) {
Xrm.Page.data.entity.save(true);
followupduration = duration;
followup = true;
return;
}
else if (Xrm.Page.data.entity.getIsDirty()) {
Xrm.Page.data.entity.save(true);
followupduration = duration;
followup = true;
return;
}
If the else if (Xrm.Page.data.entity.getIsDirty()) statement is true the form saves but following code
followupduration = duration;
followup = true;
will not run... We have to click the button once more for the code to run. Is there a way we can change this so the code runs after the form is saved?
Thanks for help!
*This post is locked for comments
I have the same question (0)