1

I am using SuiteTalk web services and trying to use SubsidiarySearch to retrieve all Subsidiary records:

    SubsidiarySearchBasic srch = new SubsidiarySearchBasic();
    srch.setIsInactive(new SearchBooleanField(false));
    SearchResult res = stub.search(srch);

I login using a customized role based on NetSuite's standard "System Administrator" role, with various extra permissions added. In particular, this role has "Subsidiaries" permissions set to "Full". However, the above code returns the following status, using this Java code:

Type=ERROR
Code=INSUFFICIENT_PERMISSION
Detail=Permission Violation: The subsidiary restrictions on your role prevent you from seeing this record.

The above code succeeds when I use the standard "Administrator" role (internal id "3") but I would like to use a customized role. What permissions do I need for a successful result?

Klitos Kyriacou
  • 10,634
  • 2
  • 38
  • 70

2 Answers2

1

Make sure all the subsidiaries are exposed or the top most subsidiary is selected for this role, and also make sure the employee, department and location restrictions are set correctly.

Sam Azad
  • 139
  • 3
  • Thanks. I added all subsidiaries to the role, and now it works. I'm developing an external application intended to be used by various clients, each with their own separate NetSuite accounts. Do they all have to modify their roles to add all subsidiaries too? (I can bundle the role that works, but if they install the bundle, that just mentions my own subsidiaries, not theirs.) – Klitos Kyriacou Feb 10 '16 at 10:35
  • 1
    What does the "Separate Netsuite Account" means? Does it means that all your clients have their own NS instance or they have user accounts in a single instance. If they have separate instance then bundle the role with highest level subsidiary including all children - this should properly map to their subsidiary structure. – Sam Azad Feb 11 '16 at 21:12
1

It may be happening because of the restrictions in the employee record. if you have set the subsidiary or location in your employee record which is not the top most one then you will not be able to get all the subsidiary while searching. To resolve it, select the top most subsidiary in the employee record and do not select any location. Also, do not select any subsidiary in the role. Cheers

Pushpak Gupta
  • 81
  • 1
  • 7
  • It still is not working, is there a different permission which we are missing here? So I have selected all subsidiaries and provided almost all permissions, still I'm facing this error. Sometimes updates don't happen in NetSuite immediately, when I try after 2-4 hrs, it automatically works. Could this be an issue now again :( – kriznaraj Mar 07 '18 at 22:12
  • which record type are you trying to access? – Pushpak Gupta Mar 09 '18 at 00:38