+ Start a Discussion
Ted LTed L 

SOQL Call to get a picklist value

Hi -

We are doing an implementation with M-Files which has a connector with SFDC. However, we were
trying to figure out how to pull picklist values out of a field of an object?

For example, we have a custom field called "region" in our user object, and we are trying to access the pick list values. If we just do it at the field level, it pulls the region for every user...but what we really want is to pull the picklist which has about 10 values or so.

Does anyone have any idea how to do this using a SoQL call?

Many thanks!





I had did somthing same like this. I used below code.


Schema.DescribeFieldResult resultSet = <object name>.<field name>.getDescribe();
List<Schema.PicklistEntry> pickList = resultSet.getPicklistValues();


I hope it will help you.

If you found this is as solution then please mark this post as solved.




Purushottam Bhaigade Software Developer, Screen-Magic
purushottambhaigade@gmail.com | www.screen-magic.com

Facebook Twitter LinkedIn

Contact me: Skype purushottam8688