How to hide child table field in other company

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:“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( ==“Company A”){
frm.set_df_property(“your_custom_field”, “hidden”, 1)

Hi @EdmundDelima,

Please try and apply it like"Company A"


Then reload and check it.

Thank You!

Hello @NCP this one is working perfectly. Thank you so much.

I tested it in version 14
But it not working

replace the “==” with “===”.

@EdmundDelima I tried and I don’t think this is the reason

@EdmundDelima oh no it works but it doesn’t work for one field in the listview


If parent doctype has a company field then it’s work.

Thank You!

1 Like