subpanels order are not saved

hi

im on suitecrm 7.10
trying to change order of sub-panels
i can hide sucessfuly subpanels
new order of subpanels are not saving, i save and then click on the DISPLAY MODULES AND SUBPANELS
and the order is the same as it was before

please your advice

If by “7.10” you mean 7.10.0, then the first thing to do is to upgrade to 7.10.4, this might be fixed already.

You can try the same issue on the live demo to see if it works there

suitecrm.com/demo

same behavior on 7.10.4

cant check it in demo version because no admin access

There’s a demo with admin access here

https://www.softaculous.com/demos/SuiteCRM

It’s still in 7.9.17, but it’s worth a try.

not working also on demo

maybe im doing something wrong ?
admin -> Display Modules and Subpanels -> Displayed Subpanels

im dragging the contracts to top to be the 1st
save and check again … setting didn’t saved

Now that I’m thinking about this better, I don’t think that screen is meant to control the order of subpanels.

I think each user can simply drag their subpanels and change the order, directly on each detail view. It probably uses browser cookies.

But if you need a way to do that for everyone, by default, I’m not sure it’s possible. You could try customizing the subpaneldefs.php in one of the modules to see if it works.

ok, I find this

https://community.sugarcrm.com/thread/26324

$subpanel_setup['modulename_subpanelmodulename1']['order'] = 100;

the modulename is it the module I want to show as subpanel
or
is it the name of the Module to show in edit view the subpanel ?

how to find subpanelmodulename1 ?
lets say I want the history\notes subpanel
modules/History/metadata/subpaneldefs.php
subpanelmodulename1=Notes ?

Nice find!

The file you create dictates which detail view you’re configuring:

/custom/modules/<module>/views/view.detail.php

So if you use Accounts there, you’re customizing how the subpanels appear in the bottom of the Detail view of Accounts module. Use uppercase plurals (Accounts, Contacts, Notes).

Then when you set each subpanel order, the modules are referencing the specific subpanel:

   $subpanel_setup['modulename_subpanelmodulename5']['order'] = 500;

I believe here you should use lowercase plurals (leads, accounts, contacts). You can try seeing how the values are set in that array before changing anything.

1 Like

For that last part, I just investigated some other places in my custom directory and I see a couple of cases like this:

aos_contracts_am_projecttemplates_1

So this would be for the “am_projecttemplates” subpanel beneath the “aos_contracts” detail view.

As I said, it’s better to echo out the contents of the array to see what’s in there.

find a better one

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/7113-changing-submenu-order-that-is-upgrade-safe

and its really working :slight_smile:

thank you pgr

It’s essentially the same technique only without the unnecessary complexity :slight_smile: