Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Creating new Employee with Access (User and Role)
Hello all,
I'm trying to create a new employee on netsuite through web service call. I'm setting the give access flag, the passwords, the EmployeeRoles, but still not getting the user created with the roles assigned. Is there something special I need to be doing?
NetSuiteWS.Employee n = new NetSuiteWS.Employee(); n.externalId = EmployeeID; n.firstName = FirstName; n.lastName = LastName; n.altName = EmployeeNumber; n.email = Email; n.hireDate = StartDatValue; n.phone = PhoneMain; NetSuiteWS.EmployeeAddressbook a = new NetSuiteWS.EmployeeAddressbook(); a.addr1 = Address1; a.addr2 = Address2; a.city = City; if (StateID.HasValue && StateID > 0) { var states = DefinitionsProvider.InstancGetStates(); a.state = states.First(p => p.ID == StateID.Value).Code; } a.zip = ZipCode; a.phone = PhoneMain; NetSuiteWS.EmployeeAddressbookList addressList = new NetSuiteWS.EmployeeAddressbookList(); NetSuiteWS.EmployeeAddressbook[] addresses = new NetSuiteWS.EmployeeAddressbook[1]; addresses[0] = a; addressList.addressbook = addresses; n.addressbookList = addressList; if (SeparationDatHasValue) { n.releaseDate = SeparationDatValue; } if (reportingToEmployeeID > 0) { n.supervisor = new 0