Hello,
I have the following custom script:
frappe.ui.form.on(‘Sesizari’, ‘validate’, function(frm){
var message = “Buna Ziua! Sesizarea Dumneavoastra a fost inregistrata! In maxim 24H urmeaza sa fiti contactati de echipa GEI Service pentru rezolvarea sesizarii! Multumim!”
console.log(message)
frappe.call({
method: "frappe.core.doctype.sms_settings.sms_settings.send_sms",
args: {
receiver_list: [frm.doc.numar_telefon],
msg: message
},
callback: function(r) {
if(r.exc) {
msgprint(r.exc);
return;
}
}
});
})
This Custom Script is sending sms when ,Save" button is clicked.
What can I use instead of ,Insert" to have the SMS sent ONLY when the document is created not anytime when ,Save" button is clicked.
Thanks!