To hide fields on form
frappe.ui.form.on("Quotation", "onload", function(frm) {
cur_frm.set_df_property("shipping_rule", "hidden",true);
msgprint("hi");
});
To hide fields in child table:
frappe.ui.form.on("Quotation", "onload", function(frm) {
//cur_frm.set_df_property("shipping_rule", "hidden",true);
cur_frm.fields_dict["items"].grid.set_column_disp('description', false)
msgprint("hi");
});
TO held fileds in table, you can use eval property of field
eval:doc.item_code == "sample item"
eval:doc.item_code.substr(0,3)== "720"
frappe.ui.form.on("Quotation", "onload", function(frm) {
cur_frm.set_df_property("shipping_rule", "hidden",true);
msgprint("hi");
});
To hide fields in child table:
frappe.ui.form.on("Quotation", "onload", function(frm) {
//cur_frm.set_df_property("shipping_rule", "hidden",true);
cur_frm.fields_dict["items"].grid.set_column_disp('description', false)
msgprint("hi");
});
TO held fileds in table, you can use eval property of field
eval:doc.item_code == "sample item"
eval:doc.item_code.substr(0,3)== "720"
This is the answer to one of my current challenges...I'll try it and come back with my results...:) Thanks!
ReplyDeleteNice,
DeleteLet me know, if you need any help.