Anyone know if I can conditionally hide a button u...
# suitescript
e
Anyone know if I can conditionally hide a button using a client script? e.g. On a Sales Order beforeLoad (UE) I add a button called "TEST" Then I add a client script to the Sales Order and want to hide the "TEST" button if the 'memo' field contains a certain word (of course, avoiding a dom hack would be ideal)
m
not sure off the top for steps to do it via client script, but you certainly can with a UE BRL so long as the UE is placed lower on the list in the "scripted record" view of the record type
at best, doing it on pageinit with a client would result in seeing the button briefly "flicker" (shown to not shown) while the page initializes and the client script processes
r
Or just run a validation on the UE button click rather than trying to hide the button. • Button => CS function • Run validation