-1

I Have a Picklist Field Like (Orderstatus__c) Field, Values are (A, B, C, D, E, F) This Picklist Field, when i am querying the Orderstatus__c Filed Those values will be displaying like Un order (B, E, C, D, A, F).

1
  • 1
    So, what is your question? Can you make it more clear? Commented Oct 11, 2018 at 17:50

1 Answer 1

-1

SOQL, Apex and API access on these fields will however return the values in their created order via Setup or deployment. Similar to when using ORDER BY in SOQL with regards to Picklist fields - "sorting is defined by the picklist sort determined during setup".

Multi-Select Picklist Value ordering behavior

3
  • Please do not post link only answers as the links often break. See How to Answer
    – Dave Humm
    Commented Oct 11, 2018 at 10:00
  • That is not correct... i have 100 Records, first 20 records Orderstatus__c Field Value is 'A' , second 21 to Remaining 50 records, Orderstatus__c Field value is C, and another remaining record values display....
    – ali
    Commented Oct 11, 2018 at 14:06
  • As a test I added a new multi select pick list with the following values in this order. The initial 3 picklist values were added at creation and the following 4 at a later time: Values API Name A A M M X X B B Q Q Z Z Y Y I then selected values on two different objects in a random order Record1.Test__c = M;X Record2.Test__c = A;M;X;B;Q;Z;Y So here it looks like the creation order. I've I re-order the picklist values to be alphabetical I still get the same result, even after edit the records: Record1.Test__c = M;X Record2.Test__c = A;M;X;B;Q;Z;Y
    – Dan Beer
    Commented Oct 12, 2018 at 12:49

You must log in to answer this question.

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