Can you remove a subpanel if you can't remove the relationship?

Greeting
So I have Opportunities and Projects. Once the Opportunity is “won” we create a Contract that links to one of the Projects. By definition we want each Contract to be linked to only one Opportunity and only one Project (by extension you get the Donor link).

You can add projects directly to the Opportunity in the Project sub-panel however this is not desired. So I tried to remove the Opportunity has many Projects relationship but i think its baked into the CRM, unless there is a work-around. I don’t see an option on the Studio to remove unwanted sub-panels.

Any ideas?
Thanks
Steve

hi mrdinghy ,

to hide or remove sub panel

You have to add a new custom php file in


/custom/Extension/modules/<module>/Ext/

if you want to remove campaign subpanel from Leads module, add a mycustom.php in


/custom/Extension/modules/Leads/Ext/

with unset () function 

unset($layout_defs['Leads']['subpanel_setup']['campaigns']);  

Then repair extensions, tour code will be added to


custom/modules/<module>/Ext/Layoutdefs/layoutdefs.ext.php

i hope this helps !

Thanks for your time and support !

Hi,
I just thought I’d mention that what adr writes here is almost right. I guess there’s been a small change in the last ten months, and I decided to write it here in case somebody else is trying to hide subpanels from a module, but can’t quite get this to work.

The custom php-file with the unset-lines in it, need to be placed in custom/modules//Ext/Layoutdefs/, and not in custom/modules//Ext/.

Thanks for the help, adr! And I’m sorry for necroposting.

I had the add the custom php file with the unset-line in the folder:

/custom/Extension/modules//Ext/Layoutdefs/

To make it working

So, I’ve done everything that was said here, and now not only did every subpanel disappear in the module (Project, if it matters), but I can no longer access Studio. It just goes to a blank page. Is there something else I’m missing?

Looks like that was a permissions error that I since fixed. However, now it’s just not doing anything.