We are programming a script on NetSuite to integrate with a third-party app.
When you access a record (whether is View or Edit) we need to determine what kind of the permission the NetSuite user has over the record.
I know by the documentation that these are the possible permission values:
- CREATE
- EDIT
- FULL
- NONE
- VIEW
I also I know I can get the user permissions by using:
var userObj = runtime.getCurrentUser();
var permission = userObj.getPermission('ADMI_ACCOUNTING')`
The problem is that I need to know what permission to ask for specifically based on the current record I'm in. I can't find a value in the currentRecord that can allow me to ask for the permission on the user object to be able to determine the permission level the user has over the record.
Anyone that has an idea on how to pull this off I would really appreciate it!