Prabhu
Prabhu

Reputation: 927

How to get role's permissions using RESTlet in Netsuite?

I want to get all the options for my role.

Example : i have attached the role's page image. i need the following permissions using RESTlet code.

  1. List->Permissions and its level
  2. Setup->Permissions and its level

enter image description here

Upvotes: 0

Views: 1496

Answers (1)

Shea Brennan
Shea Brennan

Reputation: 1132

For the most part you should be able to use:

nlapiGetContext().getPermission('permission_id')

to access the current role permissions. There is a full list of accessible permissions in the NetSuite Help Center. Search for: "Permission Names and IDs".

I need lead, prospect, customer, other name and contact also..

Lead, Prospect, and Customer records are all the same permission LIST_CUSTJOB

Other name is LIST_OTHERNAME

Contact in LIST_CONTACT

You can extract permission id's not listed in the help center by viewing the xml body of the role records. Append &xml=t to the url of any role(or record) in NS. eg:
https://system.na1.netsuite.com/app/setup/role.nl?id=1008&e=T&xml=t

Find the appropriate permission list, and try your permission value out. It's all outside the documentation, so your mileage may vary.

Upvotes: 1

Related Questions