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
kumar.fdc81.3902978579608325E12kumar.fdc81.3902978579608325E12 

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.

Thanks
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.

Regards,
Carolina.