1

I am using wsdl2java to generate client port and service from netsuite wsdl.

I can assign Access Role to Employee in Netsuite using UI. I can view the existing Role to the employee on UI.

I want to do the same using the generated code through API. I tried searching a Role assigned to the Employee but I get all other information than Role when I searched a employee using EmployeeSearchBasic.

There are classes to search SalesRole(which give Sales role only) but I want to get all Roles.

I tries getting the Role by using login() on netsuite, but that gives me single Administrator Role Only.

1 Answers1

0

Unfortunately I do not believe that Roles are a searchable or scriptable record type, so I'm not sure that this is possible.

I tried searching a few obvious record IDs in the console:

nlapiSearchRecord('role');
nlapiSearchRecord('roles');
nlapiSearchRecord('managerole');
nlapiSearchRecord('manageroles');

but none worked. I tried opening up a Role in the UI and viewing in XML mode (add &xml=T to its URL), but there is nothing that indicates the correct record type for a search there either.

NetSuite does provide a Roles Service REST API that you can hit, but that only gives you the roles that a given username and password has access to, which is not what you want.

erictgrubaugh
  • 8,519
  • 1
  • 20
  • 28