does anyone know a way to remove/disable a custom button in the UI once it’s clicked and fired it’s function?
b
battk
05/11/2022, 11:22 PM
nothing suitescript
m
matt3c
05/11/2022, 11:24 PM
yeah, that’s what I was afraid of. couldn’t find anything in the docs or SO
b
battk
05/11/2022, 11:24 PM
you can manipulate the visibility of the element by modifying the style of the dom element
m
matt3c
05/11/2022, 11:25 PM
can you add a class or id with suitescript?
b
battk
05/11/2022, 11:26 PM
same thing with the disabled property, though you still probably have to modify the style if you want to make it look pretty
battk
05/11/2022, 11:26 PM
messing with the dom is something that you use javascript for
m
matt3c
05/11/2022, 11:27 PM
thanks, I didn’t think of that. Appreciate the help
n
NElliott
05/13/2022, 8:10 AM
Depending on the context, if the record is in VIEW mode you you could reload the page and pick up a value on the before load to check preventing it from being added in the first place...