Use Case for Finding IDs of Roles Assigned to an Employee

To find IDs of roles assigned to an employee, send a SuiteQL query with the employee ID. Note that Prefer: transient is a required header parameter.

          POST {{REST_SERVICES}}/query/v1/suiteql?
{
    "q": "SELECT rolesforsearch FROM employee WHERE id = 13"
} 

        

The following is an example of the response:

          {
    "links": [
        {
            "rel": "self",
            "href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql"
        }
    ],
    "count": 1,
    "hasMore": false,
    "items": [
        {
            "links": [],
            "rolesforsearch": "1, 3"
        }
    ],
    "offset": 0,
    "totalResults": 1
} 

        

Related Topics

General Notices