Results 1 to 3 of 3

Thread: How to sort prospects by last name not first

  1. #1
    tpszeman is offline Member
    Join Date
    Jan 2007
    Posts
    6

    Default How to sort prospects by last name not first

    Hi,

    In default my SugarCRM 4.5.0h lead list sorts by first name-last name not last name-first name and I can't seem to change it only with complicated workarounds.
    Anybody can help why it's like that, and how it can be solved? It would be of great help.

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: How to sort prospects by last name not first

    Quote Originally Posted by tpszeman
    Hi,

    In default my SugarCRM 4.5.0h lead list sorts by first name-last name not last name-first name and I can't seem to change it only with complicated workarounds.
    Anybody can help why it's like that, and how it can be solved? It would be of great help.
    I can't recreate that here, mine sorts by last_name. If you edit your Leads/vardefs.php file you will see:
    Code:
     'full_name' => 
      array (
    	'name' => 'full_name',
    	'rname' => 'full_name',
    	'vname' => 'LBL_FULL_NAME',
    	'type' => 'name',
    	'fields' => array('first_name','last_name'),
    	'source' => 'non-db',
    	'sort_on' => 'last_name',
    	'len' => '510',
    	'db_concat_fields'=> array(0=>'first_name', 1=>'last_name'),
      ),
    and this is what controls the sort order
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    tpszeman is offline Member
    Join Date
    Jan 2007
    Posts
    6

    Default Re: How to sort prospects by last name not first

    Thanks a lot. I was searching around on this line as it seemed to be correct and I found this:
    It seems to be a bug in studio. I customized my listview and the file it creates with the customized defs goes to
    \custom\modules\leads\'metadata\listviewdefs.php

    In Leads a line was missing from the beginning of the file (at the definition of name) "orderby => 'last_name'". When I saved in contacts this line is there. All-in-all putting in this line solved the problem right away.

    I reported it as a bug.

    Much love, Peter

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sort order descending problem FIXED!!!
    By MrPresley in forum General Discussion
    Replies: 60
    Last Post: 2007-08-20, 08:56 AM
  2. Replies: 0
    Last Post: 2005-07-19, 12:57 PM
  3. Prospects, Created once UNEDITABLE???!?
    By Traderhut in forum General Discussion
    Replies: 0
    Last Post: 2005-06-09, 05:34 AM
  4. Adding prospects directlly to a prospect list
    By epablo in forum Feature Requests
    Replies: 2
    Last Post: 2005-06-08, 04:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •