I'm trying to get the order of picklist values on Task Type.

I have a SOQL query as follows

SELECT Id, Value, Label, IsDefaultValue, IsActive FROM PicklistValueInfo WHERE entityParticleId = 'Task.Type'

But this API does not return the values in the same order set in the Salesforce UI. I also cannot find any API that returns the order set out there.

Does such data exist?

1 Answer 1


Use a Describe call to get this information, either via the SOAP API, REST API, UI API, or Metadata API. Also, querying CustomField in the Tooling API should yield the picklist options in order as well.

  • Thanks, in my tests the Describe operation seems to preserve the order! The only drawback is that I have to return a huge amount of data, if I just want to see the details for only one field. Feb 24, 2020 at 14:30

You must log in to answer this question.

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