SMS Alert: Doing it by Js and python

You need to customized message like

  frappe.ui.form.on("Sales Invoice", "on_submit", function(frm, cdt, cdn) {
        var message = 'Invoice Number is ' + frm.doc.name;


       frappe.call({
               method: "frappe.core.doctype.sms_settings.sms_settings.send_sms",
               args: {
                   receiver_list: [frm.doc.contact_number],
                   msg: message,
               },
               callback: function(r) {


                   if (r.exc) {
                       msgprint(r.exc);
                       return;
                   }
               }
             });
})
1 Like