I don’t see Security Suite Subpanel in SOME modules

¡Hi everyone!

I have a strage problem with Security Suite.

I entered in Contacts module and I SEE Security Suite Subpanel
BUT…
I entered in Accounts module and I DON’T see Security Suite Subpanel
I entered in Custom Module and I DON’T see Security Suite Subpanel

I review in the studio the relationships of the Security Module and it have relationships with ALL modules…

Did it happen to anyone?

Hi

try Admin / Repairs / QR&R
and then
Admin /Repairs / Repair Relationships

Hi!

Thanks for your collaboration!

Yesterday I tried this and the problem continue.

I don’t know what more I can try

The Security Groups Subpanel is not created by default for custom modules.

You have to create it manually in custom/Extension/YOUR_MODULE/Ext/Layoutdefs.
Create securitygroups_Layoutdefs.php in that folder (the file name is not significant) with the following contents:

<?php
$layout_defs['YOUR_MODULE']['subpanel_setup']['securitygroups'] = array(
	'top_buttons' => array(array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'SecurityGroups', 'mode' => 'MultiSelect'),),
	'order' => 100,
	'sort_by' => 'name',
	'sort_order' => 'asc',
	'module' => 'SecurityGroups',
	'refresh_page'=>1,
	'subpanel_name' => 'default',
	'get_subpanel_data' => 'SecurityGroups',
	'add_subpanel_data' => 'securitygroup_id',
	'title_key' => 'LBL_SECURITYGROUPS_SUBPANEL_TITLE',
);

You would also need to define the label for LBL_SECURITYGROUPS_SUBPANEL_TITLE in your custom module language file.

Then run Repair / Quick Repair

1 Like

To be more precise:
The Security Groups Subpanel was not created for custom modules in older versions of SuiteCRM.

You should check if the subpanel is defined in modules/YOUR_MODULE/metadata/subpaneldefs.php

1 Like

Hi ! Thanks for your response and explication…

I will try this for a custom module that I have… But I have the same problem with Accounts module…

Do you know what I can do?

I have no clue why it would be available for contacts and not for accounts.
Did you make customizations to Accounts subpanels?
Is your SuiteCRM an upgrade of an old SugarCRM CE?

¡Hi!

¡You are a genious! The problem was the securitygroups_Layoutdefs.php. I created this file in the Layoutdefs folder, then run a quick repair and now I can see the Security Suite Subpanel

¡Thanks a lot!
¡Merry Christmas!