Subpanel auto sorting.

Hi guys,
I was wondering if there is way to automatically sort a subpanel by a specific field, let’s say the “Date Created” so the newest are on top.
I need this only for notes subpanel though.

Thanks
:slight_smile:

Anyone? @mikebeck i was hoping you to give me a hint. :slight_smile:

Please see:

https://suitecrm.com/forum/suitecrm-7-0-discussion/11171-subpanel-sort-order-is-ignored#48778

So it’s not possible to show the newest items on top.

It is working, at least for my case, but it isn’t upgrade safe(even with a repair and rebuild the changes are reverted).
I edit the custom/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php
and i changed the sort_order and sort_by for the appropriate sub-panel.
I also created a bash script to automate the editing :slight_smile:

EDIT: Just to mention, the above has been tested on version 7.7.8

I tried that as well but for me it’s still sorting ascending regardless of the sort_order.

I just want to sort on date_entered with the newest on top.

Let’s do it again.
I am doing something similar but with a custom date field named “rpr_due”
My code is :

  'sort_order'=>'desc',
 'sort_by'=>'rpr_due',

Did log out and in after the changes(sometimes is needed) and clear the cache folder?
Do you edit the correct the correct file and also the correct section in that file?
Describe your case, please (modules, relationship, one-to-many, etc.).

1 Like

Logging out and back in did the trick!

yeah! Glad to help!