Monday, May 6, 2019

Permission Violation Troubleshooting

The error: "Permission violation" may be shown in various NetSuite integration APIs e.g. Web Services, RESTlet, Suitelet or in GUI.
The first step of quick investigation is remembering the fact that this error is not connected to any API or interface (it is rather definition problem). That means that if this error is thrown in Web Services, it will be thrown also in the GUI. This works also the other way round - if it works in GUI it will work in Web Services, too.

To sum it up, solving the "Permission violation" error in GUI will solve the error also for other interfaces. For a list of permissions and our official documentation on the topic, please refer to SuiteAnswers 9911: Permissions Documentation. 

What we need:
1. Record ID
1.1 NetSuite Record Browser (10511) for record ID
1.2 Custom record ID if this is a custom record
2. Browser Debugger (Google, Firefox, Internet Explorer, Safari)
3. Administrator role to be able to add permission

The procedure is as follows:
1. Log into NetSuite using the account/role where the error occurs
2. Open browser debugger
3. Put following code

var columns = new Array();columns[0] = new nlobjSearchColumn('internalid');var searchResults = nlapiSearchRecord('<record_ type_ID>', null, null, columns);
4. Execute the code
5. Problem is reproduced
6. In other browser log into NetSuite with Administrator role
7. Add permission you need
8. Re-login with the account/role where the error occurs
9. Run the code from point #3

Summary: If you are unsure which permissions are needed repeating this procedure is the most effective way how to solve the problem. 

No comments:

Post a Comment