Note: This article covers a technical topic related to SuiteScript, and so is directed at developers. If you are working to troubleshoot this issue in NetSuite and do not have experience working with SuiteScript, we reccomend reaching out to a NetSuite developer who can support you!
For some inexplicable reason, a user event script in NetSuite sometimes throws an "Insufficient Permissions" error even though its deployment is set to run as an administrator. Here are two workarounds you can use to resolve the issue.
You can use a NetSuite role other than administrator that has the necessary permissions. My personal favorite default role is CEO because it already has most of the permissions needed by a typical user event script.
If you need more permissions, you can make an offshoot of the CEO role that includes the permissions your script needs. For example, if your script is calling a map/reduce to run, under Permissions > Setup, add the SuiteScript and SuiteScript Scheduling permissions and set their level to full.
IMPORTANT: Do not forget to name your role something appropriate and easily understandable for its use, rather than just “CEO 2.”
Scripts may still face Insufficient Permissions errors even if they're set to run as Administrator in NetSuite. The cause often traces back to:
Recent changes in Custom Record Access Type
Missing explicit permissions at the record level
Running logic in Client Scripts that can't escalate permissions
To resolve, verify access, adjust deployment settings, and shift sensitive logic to User Event scripts. When in doubt, contact your NetSuite partner to verify if it's a system bug.
We like to update our blogs and articles to make sure they help resolve any troubleshooting difficulties you are having. Sometimes, there is a related feature to enable or a field to fill out that we miss during the instructions. If this article didn't resolve the issue, please use the chat and let us know so that we can update this article!
Tagged with Troubleshooting