Scenario: The user wants a message to appear if a ...
# suitescript
d
Scenario: The user wants a message to appear if a specific checkbox is checked on the Sales Order. Since the message is only on pending Approval status, I added a workflow action script on my workflow and script's purpose is to display a message. But it doesnt work.
Copy code
var messageObj = message.create({type: message.Type.INFORMATION, message: 'hey hey', duration: 5000});

            if(myCheckBox == true){

                scriptContext.form.addPageInitMessage(messageObj)

            }
I know the script is working running because of a log I added. What am I doing wrong?
d
not sure it's available in WF script, but this works on my UE script beforeLoad method
Copy code
scriptContext.form.addPageInitMessage({ type: message.Type.WARNING, title: 'My title', message: 'Hello' });
d
doesnt work. maybe its only in userEvent script