As far as I know, we only have two display options...
# suitescript
m
As far as I know, we only have two display options for buttons: show/unshow. Is there a display option to show but unclickable (like a disabled button)?
s
buttons have a
.isDisabled()
property you can set on them
1
m
Ok thanks. will try.
a
@Sandii is it a function? I thought it was a true or false value?
d
Button.isDisabled
is a boolean property Ref: NS Help: N/ui/serverWidget Module (Button Object Members) EDIT: broken link
1
m
does it work on standard buttons or just custom buttons?
d
don't know honestly. Let us know if you test it out. May be able to get a native button by using the form passed to
beforeLoad
(
scriptContext.form
) and call its .getButton(options) function
1
m
tried and worked for my use case, native buttons.
🙌 1