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
DivyaDivya 

If - Then fields

Hi,
 I am new to salesforce and was wondering if there is a way to do an if-then relationship. Basically, I want to do something very similar to a picklist but instead of the chosen value affecting the contents of just one field, I want it to affect multiple fields.
 
So, if I choose one value out of a picklist is there a way I can have multiple fields be populated with associated values? Or, is it only a one-one relationship?
 
Thanks!
Divya
EricBEricB
Hi Divya,
I'm not sure I really understand your question, so I will give a couple answers hoping that one of them helps you.

1) Take a look at the online help for dependent picklists (field dependencies).  You can have the user's selection in one picklist control the list of values available in one or more other picklists.

2) Unless you write an sControl, it is not possible to have the user's selection in one picklist populate values in other fields (besides picklists) on the page.

3) You can write a validation rule formula that enforces dependencies between fields.  For example, you could say that if Opportunity Stage = "Closed Won", certain other fields on the record must be populated.  Take a look at the successforce pages on Validation Rules for examples of how to do this.

I hope one of those answers helps!

Eric

Eric Bezar
Platform Product Management