ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

SMS Alert: Doing it by Js and python

customization

#1

Does anyone know how to send SMS alert from script ?? i couldn’t find any custom script…

this is the link, it just tells that what will be the settings but i have to do it by script and on_submit button … anyone could help me please… highly thankful


#2

First you need to set SMS Settings and then

  frappe.ui.form.on("Sales Invoice", "on_submit", function(frm, cdt, cdn) {
            var message = 'XYXYXYXYXYX(Your MSG)';


           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;
                       }
                   }
                 });
})

#3

i have seen many sms providers and they are providig sample code to integrate it with php, C# and many others but i havent seen i seen simple sample with erpnext… can you please help me with the steps how to integrate and send sms …
thanx in advance @Sagar_Bhogayata


#4

i have to do sms settings here:
http://dev.tektician.com:32006/desk#Form/SMS%20Settings/SMS%20Settings
and then i will get this settings through this above code ?