I'd like to show an `N/ui/message` depending on a ...
# suitescript
r
I'd like to show an
N/ui/message
depending on a suitelet script parameter. I've only ever used client scripts attached to a UE button or to validate a suitelet, so i'm not sure how to call a non-entry point client function from a suitelet context. Can this be done?
Added a hidden field to be toggled from the suitelet and used the pageInit function.
e
If your Suitelet returns a
Form
, you can use
Form.addPageInitMessage()
👍 1
More generally, if you have one function that needs to be called from two different entry points, you can move the function to its own module, then include the module in the entry points