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
admin@technossus.comadmin@technossus.com 

Setting Picklist visible values from LookUp field

Hi,

 

I have created one Object on which I have different PickList Fields with different values and one Look Up field that actually is another object in my application.

I want to show/hide the different values in a  pick list depending upon which value has been selected in LookUp field.

Suppose I have selected value "A" in Look up field then I want to show  first 3 values in picklist.

& when I select value "B"  in Look Up then I want to show other 3 values in pick list.

 

Is this possible via SalesForce UI (Web) & if yes,How can I achieve this? Do I need to create any formula / Work Flow rule for it?

Marko LamotMarko Lamot

Hello,

 

this is possible, however you would need to implement a visualforce page and apex controller to achieve such behaviour.

Achieving this via standard page layout is unfortunetaly not possible.

 

 

souvik9086souvik9086

This is possible with custom visualforce page and controller. What you can do is, on the basis of selection in the lookup field you can call an apex method via actionSupport and then in the apex method you write the logic and then rerender the picklist field output panel from the actionsupport.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

 

sandeep@Salesforcesandeep@Salesforce

FIRST WAY (without any VF page and controller):

 

1. You need to set Record type on this object. let say you set X & Y two record type over this object.

2. Now you can configure pick list value as per record type as lets say first three values of pick list for record type X and last

three values for Y.

3. Now on selecting look up field value as you save it you need to update record's record type to X it will automatically give firt three options to you.

 

BUT this will not happen on run time you need to save record firt then you will be able to se desired options. 

 

SECOND WAY (With VF page):

if want it before saving then you need to apply VF Page and Controller.