Get picklist dependencies in Salesforce

In the past you had to serialize and deserialize results of picklist field describe method call to get value of ValidFor field like described here.

Now it seems like it is sufficient to use the simple query like this

SELECT DurableId,EntityParticleId,Id,IsActive,IsDefaultValue,Label,ValidFor,Value FROM PicklistValueInfo where EntityParticleId = ‘Opportunity.StageName’

 

DurableId EntityParticleId Id IsActive IsDefaultValue Label ValidFor Value
1 Opportunity.StageName.Qualification Opportunity.StageName 000000000000000AAA true false Qualification Qualification
2 Opportunity.StageName.Closed Lost Opportunity.StageName 000000000000000AAA true false Closed Lost Closed Lost
3 Opportunity.StageName.Closed Won Opportunity.StageName 000000000000000AAA true false Closed Won Closed Won
4 Opportunity.StageName.Negotiation/Review Opportunity.StageName 000000000000000AAA true false Negotiation/Review Negotiation/Review
5 Opportunity.StageName.Value Proposition Opportunity.StageName 000000000000000AAA true false Value Proposition Value Proposition
6 Opportunity.StageName.Perception Analysis Opportunity.StageName 000000000000000AAA true false Perception Analysis Perception Analysis
7 Opportunity.StageName.Needs Analysis Opportunity.StageName 000000000000000AAA true false Needs Analysis Needs Analysis
8 Opportunity.StageName.Proposal/Price Quote Opportunity.StageName 000000000000000AAA true false Proposal/Price Quote Proposal/Price Quote
9 Opportunity.StageName.Id. Decision Makers Opportunity.StageName 000000000000000AAA true false Id. Decision Makers Id. Decision Makers
10 Opportunity.StageName.Prospecting Opportunity.StageName 000000000000000AAA true false Prospecting Prospecting

However, unfortunately, Stage on Opportunity is not recognized as Dependent picklist by Salesforce

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s