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.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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