I am using a user event script to validate some fi...
# suitescript
v
I am using a user event script to validate some fields on an inventory item after the user hits save. I don't want to throw an error if validation fails because the a throw statement sends an email to the administrator. Instead, I want to take the user to a new page with the validation error displayed and a button that takes the user back to the inventory item. How can I do this?
b
first choice to do this for an actual user is a client script
v
I am a beginner. Are you saying I should use a client script instead of a user event script or in addition to my user event script?
b
theoretically you are never supposed to trust your client, so i would actually recommend a backup user event script
but i am recommending to use a client script to do your validations instead of a user event script
v
What's a backup user event script?
b
user event script to do the same validations as the client script
v
Thank you so much. I'll give it a try
b
use the saveRecord entry point for your client script
v
Ty