Sugarcrm is sorted by name, not by name

I have a bound field in a custom module that links to a contact. If I activate sorting for that field ( listviewdefs.php: sortable=>true

), the sorting works correctly using the name

contact field .

How can I sort by last_name

and then instead first_name

?

+3


source to share


1 answer


If first_name

and last_name

both are db fields, you can apply sorting in the listview in the same way as the name ( listviewdefs.php: sortable=>true

) field . You only need to add this code

first_name' => array( 'query_type'=>'default'), 'last_name' => array( 'query_type'=>'default'),



in the searchFields.php

file.

+2


source







All Articles