Execute process after save in a script

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Execute process after save in a script

Post by swiftinitpvtltd »

I have a custom button on a form that does parser.saveform();

I want to do Execute process after save in this script. How do I do that?
The out of box save button has this setting meaning there must be some internal js for this. Right now I am using settimeout but it does not wait many times for form to save as it does not know completion of form save and then sometimes I am getting message on that custom redirect that do you want to save? because redirect is happening just before parser.saveform is getting completed. I need to use custom save because I have complex js with validations etc. before saving this parser form.

var parser = AwareApp.getFormParserFromHtmlElem ($('#savebuttonfield'));
parser.saveForm();
setTimeout(function(){
AwareApp.runQuery ('MyDisplayQueryProcess, 'main');
}, 7000);
});
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Execute process after save in a script

Post by BLOMASKY »

This is NOT your answer, but since there is now a COMMIT TRANSACTION process why not call a boring old procedure with that and then add what you want to the process?


Bruce
Post Reply