I'm a newbie to Suitescript 2.0 so I'd like to use the alert functionality to highlight to users when a Purchase Order is still 'Unapproved'
I excitedly read the SuiteAnswers article N/ui/message Module
The article gave me some code snippet but I cannot get it to work. This is where I am up to. I have multiple errors that when I upload dont make sense to me.
I tried adding the log module, but that seem to have complicated it also.
When I try to create scripted record, this current version throws : Fail to evaluate script: {"type":"error.SuiteScriptModuleLoaderError","name":"UNEXPECTED_ERROR","message":"missing } after property list (SS_SCRIPT_FOR_METADATA#26)","stack":[]}
Any thoughts appreciated.
/**
*@NApiVersion 2.0
*@NScriptType ClientScript
*/
define(['N/ui/message'],
function priceHeading(message) {
var myMsg = message.create({
title: "My Title",
message: "My Message",
type: message.Type.CONFIRMATION
});
// will disappear after 5s
myMsg.show({
duration: 5000
});
log.debug({
title: 'myMsg',
});
return {
pageInit: priceHeading;
};
});