function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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!

Ted

purupuru

Hi,

 

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.

 

Regards,

Purushottam

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

Facebook Twitter LinkedIn

Contact me: Skype purushottam8688