Shelby Owens
09/17/2025, 7:00 PMCeligo AI
09/17/2025, 7:00 PMAI generated answer (using internal Slack threads):To hide a native NetSuite button with a user event SuiteScript, you can use the
beforeLoad
entry point of a User Event Script.
Here is a general approach:
1. Identify the ID of the button you want to hide. You can find the list of Button IDs in the NetSuite Help Center.
2. In your User Event Script, use the beforeLoad
function to hide the button.
Here is a sample code snippet:
javascript
function beforeLoad(scriptContext) {
if (scriptContext.type !== scriptContext.UserEventType.CREATE)
return;
var form = scriptContext.form;
var button = form.getButton({id: 'yourButtonId'});
if(button){
button.isHidden = true;
}
}
In this code, replace 'yourButtonId'
with the ID of the button you want to hide. This code will hide the button when the record is being created. If you want to hide the button in other situations, you can adjust the condition in the if
statement.
Please note that this approach might not work for all native buttons as some of them might not be accessible or modifiable via SuiteScript.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
09/17/2025, 7:01 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8908692
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.87170428
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.852966368
Celigo AI
09/17/2025, 7:01 PM