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
jlimjlim 

Picklist dependency question between Account and Opportunity

Under Account, I have a custom picklist called Region__c.

Under Opportunity, I have a custom picklist called Sub_Region__c.

 

I want to be able to setup Opportunity.Sub_Region__c picklist to be dependent on the value picked on Account.Region__c.

 

Using the UI, it appears there's no apparent way for me to set up the dependency. If Sub_Region__c is part of Account, then it is possible. But that's not what we want.

 

Can this be done using the UI, or do I need to write a VF page to accomplish this? Thanks.

MATTYBMEMATTYBME

Definitely no way for you to be able to have a dependence between two objects. Dependencies are on relative to the single objects fields.

 

You will have to do this with code.

jlimjlim

Another followup question. Say I would like to provide the ease of creating the Region/Sub-region dependency using the UI builtin tool. So, I would allow the definition of Region/Sub-Region from within Account, but hide the Sub-Region from being used.

 

From the Opportunity point of view, I create a VF page. I can get the Account.Region__c and Account.Sub_Region__c picklists values. But how to I get the relationship between them?

 

This will allow me not to hardcode the region/sub-region values in the VF page at the Opportunity. Thanks.