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
samyt
09/24/2019, 11:22 AM
@Danny Tang you can use this api to show message when the record is loaded
Hi @samyt, thanks for the help. i don't have any coding experience, would it put this before the return message?
Danny Tang
09/24/2019, 8:43 PM
**
@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
};
});