Hi everybody,
I have customized double actions that have to first run a workflow and secondary save and close the page.
I do it like this:
1 - Create a New Button on RibbonWorkbench
2- Add the first Action: Javascript Command: RuningMyWorkflow with the string parameters of my Workflow.
3- Add a second Action: Javascript Command based on my script function to save and close my page ( like this :function SaveAndClose() {
Xrm.Page.data.save().then(ClosePage, function () { });
}
function ClosePage()
{
Xrm.Page.ui.close();
}
And it works ... almost works :(
Indeed separately the 2 actions work well ( test on a different button ).
But together, the second action is too fast for the first. What I mean is: when I click on my button I have just enought time to see the window to run my workflow than the page is save and closed.
What I'm looking for a solution to have my first action proceed ,and after the save and close
Thank for your help !
Natsirt
*This post is locked for comments