Ok so I am working on a new custom extension for MyAccount that will allow for managing of contacts for Company Type Customer Records. We also allow the contacts to login to the MyAccount portal for the Parent account as well. One feature I am working on is allowing the Account Admin to resend a login or "forgot email" password to its contacts in the account.
Digging around SC, I know we have a function called "sendPasswordRetrievalEmail2()" that is part of the 'SC.Models.Init' library. I can not for the life of me get this model included in my custom extension. The only luck I have had was adding it to the older SuiteScript backend models. Which I guess this leads me to 2 questions:
1. If the SC.Model.Init is a server side only library, has it not been migrated to a component or other model for SS2 yet?
2. If the only way to access via SuiteScript 1 extension models, what is the best way to incorporate a "hybrid" approach to both SS1 and SS2 backend models and services?
I have also tried within SS2 models to create my own version of this functionality with a password reset token, however I have been hitting a wall trying to update the customer record password fields (password and password2) as well. NS keeps returning an error that password don't match even though hard coded testing is the same string variable.
Any ideas or thoughts on the best way to approach this problem?