How do you hide a stock field from studio


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.

How can i completely hide the field from studio?


I decided to choose my battles and edited the label of the unused fields with a prefix of ‘x_’ .

Visually that helped to order the list of fields in studio.

Not exactly the best workaround i know.


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;


You should try:

$dictionary['Account']['fields']['annual_revenue']['studio'] =array(
				'visible' => false, 
				'listview' => true,

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.

Thanks in advance

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.