Discussions
SuiteWorld is where the NetSuite community comes together to learn, connect, and discover what’s next.
Whether you’re looking for product updates, practical tips, new ways to improve efficiency, or insights from other customers, SuiteWorld offers something for every stage of your NetSuite journey.
■ NetSuite 2026.2 Release Notes
■ NetSuite SuiteApps Release Notes
■ NetSuite Sneak Peeks
■ Release Preview Guide
■ Release Preview Test Plan Template
Button Function Issue
HI, I have successfully created a button on a form before and got it working. have replicated this on another form and its not working! Really stumped on this.
So, in the beforeload event I have the following, and it generates the button fine.
/**
* @NApiVersion 2.1
* @NScriptType UserEventScript
*/
define(['N/runtime','N/record','N/ui/serverWidget'],
function (runtime,record,serverWidget) {
var exports = {};
function beforeLoad(scriptContext) {
var form = scriptContext.form
var user = runtime.getCurrentUser()
var currentRecord = scriptContext.newRecord
//Get value of department
var dept = currentRecord.getValue({fieldId: 'department'})
//If department is not support, then hide the Autotask tab
if(dept != 2){
//Hide resource ID