Using below code, one can set child table field read only.
Syntax
example:
Using this, we can set item_name field read-only. This will helpful if you want to make fields read-only based on some condition
});
Syntax
var df = frappe.meta.get_docfield("CHILD TABLE DOCTYPE","FIELD NAME", cur_frm.doc.name);
df.read_only = 1;
example:
Using this, we can set item_name field read-only. This will helpful if you want to make fields read-only based on some condition
frappe.ui.form.on("Sales Order","onload", function(frm, cdt, cdn) {
var df = frappe.meta.get_docfield("Sales Order Item","item_name", cur_frm.doc.name);
df.read_only = 1;
});
Hi
ReplyDeleteHow to disable the specific rows on child doctype. This help to set all field rows as readonly
Please provide solution to disable whole row of child table
ReplyDelete