Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

Removing User subpanel custom ordering

How do I remove any User subpanel ordering once a User has Dragged/Dropped subpanels to change thier order in a module?

I eventually figured out how to make a global change to the subpanel order in a module’s Detailview by creating a file in (Contacts used as an example)
custom/Extension/modules/Contacts/Ext/Layoutdefs/resequence_subpanels.php
and in that file, entering the new order for the subpanels with

<?php
// Resequence the subpanels for the Contacts Detailview
$layout_defs['Contacts']['subpanel_setup']['campaigns']['order'] = '20';
$layout_defs['Contacts']['subpanel_setup']['fp_events_contacts']['order'] = '30';
$layout_defs['Contacts']['subpanel_setup']['history']['order'] = '40';
$layout_defs['Contacts']['subpanel_setup']['activities']['order'] = '50';
$layout_defs['Contacts']['subpanel_setup']['cases']['order'] = '60';
$layout_defs['Contacts']['subpanel_setup']['documents']['order'] = '70';
$layout_defs['Contacts']['subpanel_setup']['leads']['order'] = '80';
$layout_defs['Contacts']['subpanel_setup']['securitygroups']['order'] = '900';

The problem is, BEFORE doing that, while I was poking around trying to figure out the best way to do this, I manually re-ordered the Contacts subpanels for a user.

And now, the global changes shown above work for others but NOT for the user where I made the manual change via drag and drop.

I cannot figure out how to undo the manual subpanel ordering so that the global subpanel ordering will work for all, including the user for whom the manual subpanel ordering was done.

I looked in the MySQL database in the “user_preferences” table but could not see anything that looked like it was holding the user changes for subpanel ordering.

I have (now) checked the Admin → System Settings → User Interface : Prevent user customizable subpanel layout so Users will not now be able to manually override the global setting, but I am left with the one user who already made the manual change via drag and drop.

Does anyone know how to undo the manual user subpanel ordering - done via drag and drop - so the global subpanel ordering setup will work for that user?

I have a similar problem. What product version do you have?

@eih64

I am on SuiteCRM 7.12.5

It’s probably stored in a browser cookie. You can confirm this by asking that user to log in using a different browser. And you can clear cookies to reset things.

@pgr

Great idea … but

Roller coaster ride here

When I read your post I had one of those “smack your forehead” moments where I thought “Why didn’t I think of that?”.

But unfortunately, no luck.

I tried a different browser AND cleared the browsing history and cookies in that browser, but the subpanel sequence when logged in as that user stayed as the sequence that was manually set by the user.

When logged in as another user, the global subpanel sequence applied.

When you said you looked at the user_preferences table and found nothing, did you know about the Base64 encoding of the contents field?

Run that through this website here to get to the JSON:

And then here to make it easier to read (pretty-print):

@pgr

That did it

I was looking for something with a descriptive “Category” but apparently, that is not a good idea …

I found it, deleted it and then after logging out and then back in, the manual subpanel sequence was gone and the global subpanel sequence was applied.

I’ve also bookmarked the Base64 web site.

Thank you

R

1 Like