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;
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.