You need to sign in to do that
Don't have an account?
Picklist Stored Value Incorrect
A picklist exists that is custom ordered. Not alphabetic.
The value displays on the User Interface as expected. The 'Saved' picklist values are not physically in the order as displayed on the User Interface.
This would not be important except that they are loaded into an XML file and are expected to be in the order they are displayed to the user.
Is there a way to retain the order of the picklist on the back side? Or potentially sort based on the order of the picklist in Setup? Not all values will be picked at all times and they need to be in the order represented in Setup.
Example: Order of Picklist (Both represented in Setup and displayed to the User)
Asian
Black
Native
White
Other
A query exposes the fact that the values are acually stored like this.
Asian;Black;White;Native;Other
Dislike this solution because it forces hard-coding. Works.
All Answers
Refer the below link have similar kind of issue.
https://salesforce.stackexchange.com/questions/10541/order-of-values-in-a-multi-select-picklist-is-not-consistent
If this helps, Please maek it as best answer.
Thanks!!
Ankaiah, Thank you for making an effort to help solve this issue.
Your link describes a situation concerning querining the database.
Agreed, the creation of the picklist value is potentially involved.
What Apex code may be executed to send the values stored, that matches the actual order of the picklist?
The value are retrieved and pushed as stored. They are not in the correct order base on the sort in Setup.
Since the postional value is not proper, the external system does not recieve the values as expected.
If you have an solution it would be appreciated.
Dislike this solution because it forces hard-coding. Works.