Marty Zigman Marty Zigman
Prolecto Labs Accelerator Templates

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

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - YouTube

About Marty Zigman

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

Biography • Website • X (Twitter) • Facebook • LinkedIn • YouTube

4 thoughts on “Tip: Update NetSuite Passwords Programmatically

  1. Matt says:

    This does not seem to work for updating the password of a contact – do you know of a workaround to update their password?

  2. Marty Zigman says:

    Hello Matt,

    I believe the only way to update the password on contact records is via the customer / vendor / employee entity equivalents. I may be mistaken however and invite others to comment.

    Marty

  3. Scott says:

    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');

  4. Marty Zigman says:

    Scott,

    Thank you. This is helpful.

    Marty

Leave a Reply

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