Delivery note customization

Hi @hemapope,

not quite clear from the question, but I am guessing you want to make a lookup when you open the form of the delivery note and fetch values? You might try something like this custom script:

frappe.ui.form.on("Delivery Note", {
  onload: function(frm) {
    // this function is called when the delivery note form is displayed
    // load related information
    frappe.call({
       "method": "frappe.client.get",
       "args": {
            "doctype": "BOM",
            "name": doc.frm.items[0].BOM  // the correct BOM reference
       },
       "callback": function(response) {
            var bom = response.message;
            if (bom) {
               frappe.msgprint("BOM: " + bom.name);
               // write value to form
               cur_frm.set_value('field_name', 'value');
            } else {
               frappe.msgprint("BOM not found");
            }
       }
    });
  }
});

Hope this helps to get your started…