title: Netsuite: how can I add an employee with a role, access, and a password via SuiteScript?
body: <p>This code work great for creating the employee, but the password and giveAccess fields are not set:</p>
  
  <pre><code>function CreateEmployee() {
    nlapiLogExecution('DEBUG','running create employee',1);
    var employeeRec = nlapiCreateRecord('employee'); 
    employeeRec.setFieldValue('lastname', 'Aloe');
    employeeRec.setFieldValue('firstname', 'Danny');
    employeeRec.setFieldValue('email', 'test9475@test232.org');
    employeeRec.setFieldValue('subsidiary', 3);
    employeeRec.setFieldValue('giveAccess', true);
    employeeRec.setFieldValue('role', 3);
    employeeRec.setFieldValue('password', 'Somepassword1!');
    employeeRec.setFieldValue('password2', 'Somepassword1!');
    var id = nlapiSubmitRecord(employeeRec);
    nlapiLogExecution('DEBUG','done: ' + id + ' employee',id);
  
    var result = new Object();
    result.id = id;
  
    return result;
  }
  </code></pre>
  
  <p>When I go to the web interface and pull up the employee record, the "Access" tab does not have the giveAccess checkbox checked.  And trying to login as the new user does not work. Is there a trick other than employeeRec.setFieldValue to set these values?</p>