-
Notifications
You must be signed in to change notification settings - Fork 10
Fetch field value in child table from linked doctype
Jignesh Greycube edited this page May 30, 2018
·
1 revision
Step 1: Create Custom Script for Sales Invoice (parent) doctype
Step 2: Script as below & Save
frappe.ui.form.on("Sales Invoice Item", "batch_no", function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
`frappe.db.get_value("Batch", {"name": d.batch_no}, "expiry_date", function(value) {`
`d.expiry_date = value.expiry_date;`
`});`
});