You need to sign in to do that
Don't have an account?
SOBJECT:Contact does not match domain of foreign key error
Hi all,
i am getting an error for the bind expression accidsLst in the below SOQL query
Can anyone please help?
thanks
i am getting an error for the bind expression accidsLst in the below SOQL query
List<Contact> accidsLst=new List<Contact>(); for(Contact con :newContactsLst) { contactsMap.put(con.Id,con); } accidsLst=[SELECT AccountId FROM Contact WHERE Id IN:contactsMap.keySet()]; for(Contact con :[SELECT Id,Primary_Contact__c FROM Contact WHERE Id NOT IN:contactsMap.keySet() AND Primary_Contact__c=true AND AccountId IN : accidsLst]) //error for accidsLst { }
Can anyone please help?
thanks
Thanks for your reply but that too doesn't work.
i solved it by using the below code:
All Answers
You should use the Account List instead of Contact List.
Try the below code.
Change Line Number 8 and 9 Accordingly.
Thanks for your reply but that too doesn't work.
i solved it by using the below code:
You can do this by the following
The error in your program is due to being accoutidslist as Accounts