Get list of all roles in Netsuite

后端 未结 4 2009
情歌与酒
情歌与酒 2021-01-16 17:18

Is there a way to get the list of roles that are available in an Netsuite account? I am working on a provisioning solution with Netsuite and I am very new to netsuite. if an

相关标签:
4条回答
  • 2021-01-16 17:47

    To view Roles list:

    Go to Setup > Users/Roles > Manage Roles
    

    There is a work around to get the list :

    Create a saved search on the employee record with role in the search column (group) and then use search API to get this search result.

    0 讨论(0)
  • 2021-01-16 18:08

    There is a REST role service that can retrieve all accounts, roles and domains available for a user:

    URL: https://rest.netsuite.com/rest/roles
    
    Headers:
    GET /rest/roles HTTP/1.1
    Accept: */*
    Accept-Language: en-us
    Authorization: NLAuth nlauth_email=johnsmith@xxxxx.com, nlauth_signature=**** 
    

    For more details, see the help documentation (Netsuite login required).

    0 讨论(0)
  • 2021-01-16 18:09
    This is example  :  
    
    $nsroleObject = new RecordRef();  
    $nsroleObject->internalId = $roleId ? $roleId : $this->_accountInfo['nsrole'];  
    
    $passPort = new Passport();  
    $passPort->email = $this->_accountInfo['nsemail'];  
    $passPort->password = $this->_accountInfo['nspassword'];  
    $passPort->account = $this->_accountInfo['nsaccount'];  
    $passPort->role = $nsroleObject;  
    
    $loginRequest = new LoginRequest();  
    $loginRequest->passport = $passPort ;  
    
    $result = $this->netsuiteService->login($loginRequest);  
    if ( !$result || !$result->sessionResponse->status->isSuccess ) {  
        return false;  
    }  
    
    // if success, update roles list    
    $this->_wsRoleList = $result->sessionResponse->wsRoleList->wsRole;  
    
    0 讨论(0)
  • 2021-01-16 18:13

    A successful Login request to Suitetalk (Netsuite Webservices) returns list of all roles available. http://tellsaqib.github.io/NSPHP-Doc/class_net_suite_service.html#ae54779a9faa0c0be881b5ed284c5e8b3

    0 讨论(0)
提交回复
热议问题