AnsweredAssumed Answered

send an email after contact updates in backbone.js

Question asked by john Fieldsend on Jun 13, 2019
Latest reply on Jun 19, 2019 by john Fieldsend

following from my previous question, I have a button to reset a contacts password field and want to send the contact an email once the update is complete the function that updates the row is


resetUserPassword: function(model) {
var id = this.model.get('id'),
contactBean ='Contacts', {id : id}),
hashed = 'e5ad35935c7e446f0fa122a62fd59317fc5604c33b8098f10459e0aa3bbd26f8e9a645d45e81ce7e5a45fd90a5426ae36b0af97715d242f74b08897f8eb5e37e';

contactBean.set('registrationpassword_c', hashed);{}, {success: function(model, data) {
console.log(model, data, contactBean);'update_complete', {
level: 'success',
messages: 'Password reset to Magicard123 and an email sent to the user.',
autoClose: true
console.log("Password reset.");


Do i create a new email bean is the success function? not sure on the best way to achieve this