Modify drop down item

Hello can anyone please help me about how to modify "get items from " drop down menu in sales order to add "my custom doctype " to this menu

Hi @ALI_ALKOUSA,

Please apply and check it.

frappe.ui.form.on("Sales Invoice", "refresh", function(frm) {
    frm.add_custom_button(__("Your Custom DocType"), function() {
        frappe.set_route("app", "your-custom-doctype");
    }, __("Get Items From"));
});

Thank You!

We all know that WordPress is the most popular CMS on the web. Through the use of plugin you can make perfactly drop down of wordpress sites which save the time and money that is very important for everyone.frappe.ui.form.on(“Sales Invoice”, “refresh”, function(frm) frm.add custom button( (“Your Custom DocType”), function() frappe.set route(“app”, “your-custom-doctype”) frappe.set route(“app”, “your-custom-doctype”) frappe.set route(“app”, "your-custom

__(“Obtain Items From”));

});

Thanks alot bro , iam beginner can you please tell me where i should put this code

Hi @ALI_ALKOUSA,

Please apply code in Client script.
Doctype: Sales Invoice
Apply To: Form

Thank You!

2 Likes