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
hy.lim1.3897974166558203E12hy.lim1.3897974166558203E12 

default dependent picklist value

Hi, how can i default a dependent picklist value if there is only one value?

for example, i have controling picklist value of A,B,C and dependent picklist value of 1,2,3,6,7,8

A - 1,2,3
B - 6
C - 7,8

so when i select B my dependent picklist will automatically show 6 instead of None and need to choose again since there is only onle value there.
Best Answer chosen by hy.lim1.3897974166558203E12
vinothvinoth
Hi, You can achieve this by making dependent field as required.

All Answers

Ashish_SFDCAshish_SFDC
Hi, 

In that case, you have to add another value "None" to the Picklist Field B. 

So that when you drop down on B - you will have 6 and "None" two optios available. 

Regards,
Ashish
kishore64kishore64
once check your controlling picklist value in that they ask picklist default value i think ur setted to default value as a 6 other wise it shows the none option 
hy.lim1.3897974166558203E12hy.lim1.3897974166558203E12
hi kittu,

can you show me where do i set this default value? i wanted to default my dependent picklist value instead of controlling picklist value
Ashish_SFDCAshish_SFDC
Hi, 

Go to the path below to change the default Value. 

Go to Setup | SObject | Fields  | Field Name | Under Picklist Values |  Click on Edit beside the default Value  | Uncheck the check Box | Default Make this value the default for the master picklist | Save 

Regards,
Ashish
vinothvinoth
Hi, You can achieve this by making dependent field as required.
This was selected as the best answer
chrinderPWWchrinderPWW
Making it required works in Classic.  However, even when required it does not work in Lightning.  Does anyone know how to get this to work in Lightning.  If only one option and required, it would be much more user friendly to have it selected.