I have created a custom setting, navbar, which has 1 custom field, URL (data type URL). In this field I have 5 elements that link to apex pages (Home, chatter, cases, etc) but it could go down to 3 or even up to 10 depending on what is needed. I have these being displayed properly and dynamically but the issue is I would like them to be in a specific order. Currently they are listed in alphabetical. Is there a way I can attach/assign a number to each element so that I can sort the elements that way?

1 Answer 1


I humbly recommend:

  • use a List Custom Setting (which allows you to create multiple coexistent instances)
  • add another field (Number) to the setting called Order__c.

then use SOQL to select the setting instances in the correct sequence with ORDER BY Order__c

  • 2
    Worked perfectly!!
    – Grady D
    Feb 26, 2014 at 18:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .