Subpanel sort_order is ignored


I have created a custom module that has a relationship to the Project module. I want to change the sort order for the custom modules Project subpanel so went to

/custom/Extension/modules/Project/Ext/LayoutDefs/<custom_module>_project.php and changed:

‘sort_order’ => ‘desc’,
‘sort_by’ => ‘amount’,

With the intention it would sort the amount field from highest to lowest. I ran QRR and the subpanel did sort on amount but in ascending order. To check I wasn’t going mad I changed

‘sort_order’ => ‘asc’,

and after QRR it still sorted amount in the same order.

Please can you let me know what I am doing wrong which is causing the sort_order to be ignored?

I tried sorting on other fields with the same result, the correct field was sorted but sort order ignored.


Version 7.4.3
Sugar Version 6.5.20 (Build 1001)

Any help gratefully received

It’s a bug in SuiteCRM. I also never managed to sort subpanels in a descending way (newest on top).

Is there an Issue created in Github for this bug?

It’s not going to get fixed unless there is one…

it’s been a long time since this topic was opened but i have just faced the same issue and i think i found a solution which is quite easy. Actually it is not a solution, is just what i realized you have to do in order to make your changes to /custom/Extension/modules/Project/Ext/LayoutDefs/<custom_module>_project.php to be valid.
After the QRR, you must logout and login to SuiteCRM in order your changes to be active. From what i have realized is that when you click in a filter(sort), maybe a global variable is initialized with your selection. You can see this if you click a filter and then change page and return to it or reload the page. Then the filter is not changing to its init status but it holds your last selection. This continues until logout. The same thing happens also if you change the sorting from php file. The QRR is not enough, as you have to re-initialize the filter by logout-login.


even longer time i know :), but this worked for me too -

1 Like