Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Tip: Update NetSuite Passwords Programmatically

NetSuite Technical

Tags: , , , , ,

While not documented in NetSuite’s help page, the user group has come through.   During a Magento integration project, we needed to create and update user accounts through our custom Restlet (note, it is much easier to program PHP against Restlets versus NetSuite Web Services).  We became a bit nervous as NetSuite’s Records Browser didn’t share that passwords were available for update.

SuiteScript to Update Passwords

The following code pattern should be familiar to SuiteScript developers.  While fairly obvious, when capacities are not documented,  it’s easy to become concerned.

customer.setFieldValue('accessrole', role_id); 
customer.setFieldValue('pass'+'word', password);  // not documented; break into two parts to fool the 
customer.setFieldValue('pass'+'word2', password); // IDE to not complain that field isn't supported. 
customer.setFieldValue('giveaccess', 'T'); 
customer.setFieldValue('sendemail', 'F');

Get Help

If you want to automate or integrate your system to NetSuite, contact us.

Marty Zigman LinkedIn

Marty Zigman

Holding three official certifications, Marty is widely recognized as a top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. A former Deloitte & Touche CPA and technology executive with CTO roles, he brings over 35 years of leadership in ERP, CRM, and eCommerce business systems. Contact Marty to engage directly.

BiographyYouTubeLinkedInX (Twitter)

4 thoughts on “Tip: Update NetSuite Passwords Programmatically

  1. To set or update the passwords for contacts of a customer/company you do it via the “contactroles” sublist on the customer/company record.


    company.selectLineItem('contactroles',i);
    company.setCurrentLineItemValue('contactroles','giveaccess','T');
    company.setCurrentLineItemValue('contactroles','fillpassword','T');
    company.setCurrentLineItemValue('contactroles','password','TEST1234!');
    company.setCurrentLineItemValue('contactroles','passwordconfirm','TEST1234!');
    company.commitLineItem('contactroles');

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *