Thursday, 8 November 2018

Setting Custom Query in ERPNext

frappe.ui.form.on("Material Request", "onload", function(frm) {
    frm.set_query("item_code","items", function() {
        return {
            "query" : "custom_app.controllers.queries.custom_item_query",
            "filters": {
                "item_group": frm.doc.item_group
            }
        };
    });
});

No comments:

Post a Comment