has anybody been able to show a message / error to a user on button click, if certain criteria are not met? i'm struggling to figure out how i might be able to do this
al3xicon
05/11/2022, 3:50 PM
e.g. on a sales order a user can click a button to get a freight quote. if there is no ship method set, i want to display a message to the user that they need to set one.
n
NElliott
05/11/2022, 4:17 PM
Add the button with User Event script.
Add a client script that has the function you want to call when you want to display a message. Or do you know this bit just not sure about the actual message generation?
NElliott
05/11/2022, 4:18 PM
@al3xicon and would an alert suffice?
NElliott
05/11/2022, 4:20 PM
you could alert and return false from your function.
NElliott
05/11/2022, 4:27 PM
and apologies if you were looking to do this in a workflow, just realised you posted this in "SuiteFlow" not "SuiteScript" channel 🤦♂️
a
al3xicon
05/11/2022, 4:54 PM
Thanks, yeah I already knew how to do this via script. Was asking about doing it via workflow.
al3xicon
05/11/2022, 5:00 PM
I got it to work, had to switch the action in the failed state to return user error on Entry, not on Before Record Load