How to Sort list of Tasks , Accounts , Leads using Date Created Vise. Permanentely

Hello all
How we can sort Tasks , Accounts in List view Date vise permanently for all users ??


Basically you need to extends the class include/ListView/ListViewData.php (to create custom/include/ListView/ListViewData.php). This class has the method getOrderBy which is invoked when the orderBy is not requested by user on ordering ListView. So you have to modify the custom version of such method accordingly.
Object from this class is instantiated at method __construct of ListViewDisplay which is a subclass of ListViewSmarty whose object is instantiated at method preDiplay of view.list.php.

In short words, you need to:

  • create custom versions of view.list for the desired modules, which extends the default view.list
  • create custom ListViewSmarty which extends the default ListViewSmarty
  • modify __constructor of custom ListViewSmarty in order to override attribute lvd accordingly.


1 Like