Do we need to have a verification logic in User Ev...
# suitescript
f
Do we need to have a verification logic in User Event Script to ensure that Client Script did not fail for a reason or another?
l
Sorry, can you please elaborate?
s
I'd say if the behavior is critical, to back it up with a server-side script of some sort is prudent. client scripts have no guarantees
f
@Lea CC I was thinking of a technique to have a hidden field that will have a certain value only if client script successfully executed. the the user event script will validate that field to ensure that client scripts has been executed. this can be a built in SuiteScript feature so you can trust your client script to do business logic.
l
I don't think there's a built-in methodology that can tell if the client script has executed or not. What I think would be a logical way to do it is to 1) Deploy a client script that will mark a checkbox on page init 2) Deploy a Before Submit UE so that when user saves the record the UE script can check if the checkbox is ticked or not.