Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Alternative to nlobjContext.getPermission() for a specific custom record
I'm trying to conditionally add a button if the current user has specific permission levels on two custom records, however support tells me this isn't (yet) supported. Any recommendations on best alternatives?
Thank you,
Evan
This is what I'm trying to do:
if (type == 'view'){ var context = nlapiGetContext(); var bookingPermissionLvl = context.getPermission('customrecordbookings'); var implementPermissionLvl = context.getPermission('customrecord_implementations'); form.setScript('customscriptcontractsv2clientupdate'); if (bookingPermissionLvl > 3){ form.addButton('custpage_renew', 'Renew', 'bookingRenewAction();'); } if (bookingPermissionLvl >= 2 && implementPermissionLvl >= 2){ form.addButton('custpage_createimp', 'Create Implementation Records', 'createImpAction();'); } } 0