3

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?

3

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 '14 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.