@jonny It's not set to ".js"... define(['N/ui/message'], function(message)
j
jonny
06/07/2017, 4:55 PM
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
justinb
06/07/2017, 4:58 PM
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
jonny
06/07/2017, 5:56 PM
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
justinb
06/07/2017, 7:43 PM
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.
justinb
06/07/2017, 7:44 PM
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.