Is there any way to create a contact and set password using script?

Alon Grod
Tera Expert

Hi,

Is there any way to create a contact in 'customer_contact' table and set the login password using script?

Please share the script if possible

1 REPLY 1

Ankur Bawiskar
Tera Patron

@Alon Grod 

customer_contact extends sys_user so you can set the password using this logic

gr.user_password.setDisplayValue('your password here'); // gr is the GlideRecord object for that table

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader