Right now, on the Purchase Order object, when the ...
# suitescript
d
Right now, on the Purchase Order object, when the user clicks "Save", the dialog box shows up; user clicks OK; then the page loads. Anyone know how can I change the order so that my dialog box script comes after the page loads?
s
@Danny Tang you can use this api to show message when the record is loaded
d
Hi @samyt, thanks for the help. i don't have any coding experience, would it put this before the return message?
** @NApiVersion 2.0 @NScriptType ClientScript @NModuleScope Public */ define([], function () { function showMessage() { var message = "Purchase Request is saved. Next step is to click on the submit button."; alert(message); return true; } form.addPageInitMessage return { saveRecord: showMessage form.addPageInitMessage }; });
like that?
s
No it runs in uservent type script