Hi, what is the way to hide button based on a form...
# suitescript
s
Hi, what is the way to hide button based on a form id in before load event?
s
Not sure beforeLoad is the correct place to do since it happens server side. PageInit on client is likely more appropriate, something like
$("#blah_buttonid").hide()
You should be able to inspect the page and get the id of the div you want to hide.
s
oh ok. The button is displayed from the user event before load.
even though do we need client script to do this?
s
If you are adding the button in the UserEvent, then just read the form id and don't add the button
s
so is it possible to read the form id in before load?
j
What kind of record?
s
invoic
j
context.newRecord.getValue({fieldId: 'customform'});