+ Start a Discussion
magdamagda 

Dependency between Account and Contact

Hi,

I create a custom object and i want to have a lookup with account and a second one with contact.
BUt I want to have a dependency between account and contact.
I try to do a new field dependency, and it is not possible to choose account or contact.

Do you have an idea?

Thx

Magda
Jeff TalbotJeff Talbot
Dependancy for what? Selected Contact must be associated with the selected Account?
magdamagda
Correct,

first select account and after that contact depend on Account.
Jeff TalbotJeff Talbot
At this time, SF doesn't provide a way to filter on lookup fields. There are two things I would try. I'm not 100% certain these will work, but it's what comes to mind to try. There are pros/cons with each method.
 
1) Scrap the Account lookup field. Instead, use a workflow rule and workflow field update that populates a custom "Account" text field with the selected Contact's Account.
 
2) Use a validation rule to check that the Account ID and the Contact Account ID are equal.
 
Hope that helps.