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
Johnson PaulJohnson Paul 

I want to make a Lookup field dependent on another Lookup field

I have two products - Rooms and Meal Plan. These are lookup fields on another custom object. I want the Meal Plan option to appear/activate only once the room option is selected...

User-added image
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
For the above requirement you have create a custom lightning component.If you dont want to use code then you can create a validation rule so that the user will not be allowed to save the record without selecting room ,if meal plan is selected.
Validation rule formula like this
AND(NOT(ISBLANK(mealplanoption)
        ,ISBLANK(room)
)

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards
Johnson PaulJohnson Paul
Thank you very much that works!! - I was trying to implement a method by which 'Meal Plan' field is disabled till a Room is selected - like field dependencies
Richika Varshney 10Richika Varshney 10
Hi Johnson Paul, Can you tell me how you implemented this?