Hello, What is the best way to update the user’s p...
# suitecommerce
v
Hello, What is the best way to update the user’s password via an extension/script? Earlier we had a Commerce API method called doChangePassword(), but since that was in SuiteScript 1.0, we cannot use it now. We are using the latest SC version.
s
What's wrong with doChangePassword()?
v
It had been working fine since a long time, but we recently discovered that we’ve been getting this error: “The URL to reset your password is not valid”
I’m not sure what URL is expected here. We are just passing the new password in the 2nd parameter of the function.
https://system.netsuite.com/app/help/helpcenter.nl?fid=section_n2497708.html#bridgehead_3994879044 If I’m calling this method from an extension, what do I pass in the first parameter? If I use ‘null’ or an empty object (‘{}’), it does not work.
b
params is `{ cb:
params is
{ cb: somerandomhash }
that gets generated in the reset password email
v
@Bryce Krah Thanks for the information. How do we get that data (the hash) though? Since we are directly calling that method from our extension. Or are we not following the right process to change password via script?