Iām trying to avoid confusion when working in studio by hiding some stock fields, by setting āstudioā=false in custom/Extension/Modules/Leads/Vardefs/vardefs.etc.php :
The field is being hidden from the āfieldsā list correctly but it still appears in the edt/detail Layouts.
Is there any update on this? We want to hide some stock fields (annual_revenue and industry) from the Accounts module, they donāt appear in the field list but they keep appearing in the EditView/DetailView from Studio:
This is the code we are applying for the fields extension vardefs (itās working for other stock fields):
$dictionary[āAccountā][āfieldsā][āannual_revenueā][āstudioā] = false;
This isnāt what we are trying to accomplish. Probably I didnāt explain myself properly, apologies.
The result we want to achieve is that those stock Account fields donāt appear at all in the Studio, nor in the field list, nor the EditView/ListView editions.
Using the code I posted above we can hide almost ANY stock or custom field from the studio. But the fields āannual_revenueā or āindustryā arenāt fully hiding.
I believe they have a āspecialā behaviour, cause they appear in many different files of the core. Therefore probably the studio property donāt work on the same way.
Not sure yet if this should be an issue for the github flow.
Hey @sinergiacrm I think this is a core issue but Iām trying to confirm this since it wouldāve been there since the initial commit.
Iāve narrowed it down to an area but I donāt propose it as a fix since I donāt know what implications it may have.
I would recommend raising this as a GitHub issue to help us track it.
I believe that when the Studio loads up the layout view it gets validFields (these are fields that are studio !== false) which you would think would stop the field in question from appearing. However itās that secondary logical operater isset($this->_orginalVieDef[$key]) which allowing that field to pass through and thus appear when it shouldnāt.
Now going into a deeper dive this _originalViewDef actually is created here:
It seems that studio ALWAYS look to the original view defs which are in modules/Accounts/metadata etc etc then breaks⦠surely you would think it should look at custom first? However I still donāt think this will solve everything.
But definitely not able to resolve this as expected.