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
mavsmavs 

filter picklist by recoedtype

Hello Team,

Can any of you tell me if we can filter Picklist by recordType through API? If so could someone please provide some sample code on how to do this.


Thanks
Saurabh DhobleSaurabh Dhoble
http://writeforce.blogspot.com/2012/11/the-trouble-with-picklists-visualforce.html

Pls mark as answer if this answers your question.
mavsmavs
Thanks. This post explains the requested functionality can be done in Visualforce.

I am looking to filter the picklist by recordtype in .net code. Is it even possible to do this in .net?


Thanks
Saurabh DhobleSaurabh Dhoble
You'd have to go through the RecordTypePicklistValues array (called picklistValues) on the RecordType object, and match the Picklist based on name.
Here's (http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#CSHID=meta_picklist.htm|StartTopic=Content%2Fmeta_picklist.htm|SkinName=webhelp) a sample in Java, you can convert it to .Net.