javascript - Lightswitch 2013 - HTML Client -> commitChanges() and showOtherPage() in union -


just thought id ask on here driving me insane... im trying commitchanges() or applychanges(), followed myapp.showbrowseotherscreen()

this way im trying it:

var result = confirm("send parcel?"); if (result == true) {     screen.projectfinance.sendparcel = true;     myapp.showbrowseinvoices(); } else {     msls.showmessagebox("application not sent", { title: "aborted" });     myapp.cancelchanges();     screen.projectfinance.sendparcel = false; } }; 

what displays message "send parcel", if click ok, then brings option, sendparcel has been set true, there unsaved changes on page...

i need save , navigate im not sure try next, or advice

save(), savechanges(), , commitchanges() asynchronous. starts save operation, tries navigate away before save completed.

myapp.commitchanges().then(function () {     myapp.showbrowseinvoices(); } 

the .then method takes 2 parameters. both functions, can defined in line example above, or calls functions defined elsewhere. first parameter executed after successful completion of operation, , second after failure.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -