<@U2ED4NDEK> It's not set to ".js"... define(['N...
# suiteflow
j
@jonny It's not set to ".js"... define(['N/ui/message'], function(message)
j
justinb: Ah, you're loading the module into the workflow action script. I'm not sure that the message module is available for workflow action scripts, I believe you can only use it in a client script or in the browser. That's why I was suggesting to have the
require
function I posted earlier run inside of your workflow action script.
j
Yes, the module is only available in Client Scripts but I was trying to call it within a workflow. I've tried to use require but I still get the same error when trying to create the WFA script record.
j
What you need to try is creating the workflow action script which has the define function but does not import the messages module, then inside the define you would have the require function which loads the messages module from inside the browser. As long as the workflow action executes inside the browser this should work.
j
thanks for your help! I got the WFA script to create but when it executes in the Workflow it throws the same error that the module doesn't exist once it gets called.
bout ready to give up on this. 🙂 thought it would be a nice custom Action to have to easily display messages to users instead of using a custom HTML field like we currently do but oh well.