Results 1 to 4 of 4

Thread: Sorting a list of records in a Subpanel

  1. #1
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Sorting a list of records in a Subpanel

    Hi,

    In a Subpanel how to I have them sort by the date created? Without the need for the user to set this, I want it to just happen

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  2. #2
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Sorting a list of records in a Subpanel

    Never Mind,

    Found it in the layoutdefs extension for Accounts

    Rgds


    CAPTHA is very annoying
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  3. #3
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Sorting a list of records in a Subpanel

    Hello,

    Write following line of code

    PHP Code:
    $layout_defs['Accounts']['subpanel_setup']['contacts']['sort_by'] = 'date_entered'
    custom/Extension/modules/Accounts/Ext/Layoutdefs/<FILENAME>.php

    Repair & Rebuild cache.

    Just a matter of 4 mins!! Good to know you found answer!
    Last edited by davidboris; 2010-09-16 at 11:47 AM.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  4. #4
    rmottino's Avatar
    rmottino is offline Member
    Join Date
    Apr 2007
    Posts
    5

    Default Re: Sorting a list of records in a Subpanel

    Hi Chris,
    You have to extend the layoutdef.
    Create a file at:
    custom/Extension/modules/Contacts/Ext/Layoutdefs/<filename>.php
    -where Contacts is the module that holds the subpanel in it's detailview.
    -filename could be any you like

    In the file write:
    Code:
    $layout_defs['Contacts']['subpanel_setup']['accounts']['sort_by'] = 'date_entered';
    Do a quick repair & rebuild and you done.

    Hope it helps!

    Best regards

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help in Accounts sorting in subpanel
    By hasi21 in forum Developer Help
    Replies: 0
    Last Post: 2010-05-03, 11:50 AM
  2. Sorting Subpanel items
    By ac1982 in forum Developer Help
    Replies: 0
    Last Post: 2010-02-09, 11:24 AM
  3. Need help for the subpanel sorting
    By hasi21 in forum Developer Help
    Replies: 0
    Last Post: 2009-12-11, 10:25 AM
  4. Sorting data within the subpanel
    By kheald in forum Developer Help
    Replies: 1
    Last Post: 2007-09-14, 12:07 AM
  5. Sorting Accounts field in a subpanel
    By killroy in forum Help
    Replies: 1
    Last Post: 2007-06-06, 10:18 AM

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
  •