1

I have an extension that calls a service when user clicks Save or Save and Close. It works on Save. But on Save and Close, the window is closed before the request is completed. How can I make it to wait until the request is completed?

$evt.addEventHandler(item, "save", this.getDelegate(this.onItemSave));
onItemSave = function (ev){
    var someData = getMyData();
    ServiceSaveMyData(someData)
}
ServiceSaveMyData(data){//code to save data}
2
  • 1
    Should you be doing this through the UI at all? In Event System you can control this (by making your event Synchronous), not sure you can do that with Anguilla.
    – Nuno Linhares
    Commented Mar 30, 2016 at 17:54
  • Can you please add code for SaveMyData, seems to be problem with that code.
    – Hiren Kaku
    Commented Mar 31, 2016 at 1:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.