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
Tejas Wadke 5Tejas Wadke 5 

How to filter contacts lookup based on account selected


I have two lookup fields Company name(Account) and Contact Person(Contacts) on Visits object.Based on Company Name selected i want to filter the Contact person.

Piyush Kumar 58Piyush Kumar 58
Select Id, name, Contact_Person__c from Visits__c where Company_name__r.Name='SelectedCompany'
Vivek DVivek D
If it is a standard Visit page create Contact Person as filtered lookup field, and add the loop condition to be Company Acocunt == Account.
Tejas Wadke 5Tejas Wadke 5
I created filter on Contact person(Contact lookup) but there is no reference to the Company name(Account lookup) to create a filter.
What could be the other solution for this ?