+ Start a Discussion

based on picklist value need to edit lookup field

Hi all,

Once enter the picklist(Risk Assessment field) value need to edit lookup(Peer Reviewer) field, otherwise greyout lookup field.

-> Req:- Peer Reviewer field cannot be populated until after the Risk Assessment field is populated.

I written Components, Apex class, VF page.

Carolina Ruiz MedinaCarolina Ruiz Medina
Hi Kumar,

In order to enable a field - in your case a lookup field- depending on the value of another field, you will need to use VF page, and only render the lookup field when the picklist value is the desired. This check can be done in the controller or even in a JS function.
Also another option is to apply a CSS to the field to dont allow the editing of the Lookup till the user choose the correct piclist value, again it should be possible to do by Controller or JS code.

Here you have some code sample: http://stackoverflow.com/questions/10015597/display-fields-based-on-selection-on-a-picklist-selection

Hope it helps.