Hi, i have set up multiple companies, in Sales Invoice child table Sales Invoice Item, i added a new field “pouring_date” but it should only visible in company A and not visible in company B. I tried putting a condition in Permissions Depend On like this: eval:doc.company==“Company A” but it doesn’t work. How to achieve this? Is this possible via client script or can be done via customize form Permissions. Thank you in advance.
Hi @EdmundDelima you can use frm.set_df_property
frappe.ui.form.on(“Sales Invoice”, {
refresh: function(frm){
if(frm.doc.company ==“Company A”){
frm.set_df_property(“your_custom_field”, “hidden”, 1)
}
})
Hi @EdmundDelima,
Please try and apply it like
eval:parent.company=="Company A"
Example:
Then reload and check it.
Thank You!
1 Like
replace the “==” with “===”.