You need to sign in to do that
Don't have an account?
Érick BS
Invalid bind expression type of Contract__c does not match domain of foreign key (146:16)
Hi! I am a new developer in Apex... Could someone help me to solve this error? I can´t understand what I have to do.
private static List<Task> queryExistingContractsTasks( List<User> entradaDuenos, List<Contract__c> entradaContratos ){ return [ SELECT WhoId, OwnerId FROM Task WHERE OwnerId IN :entradaDuenos AND WhoId IN :entradaContratos AND Subject LIKE '%Contract%' AND CreatedDate = TODAY ]; }
I believe the WhoId on task can only point to user and contact.
In your case, you are assigning it to custom object.
Hope this helps!
Hi Gauravendra! First of all, thank your for your message.
I only could solve this problem adding a sub-query and works.The problem was because I did not pass the ID in the list, and this is a required in SOQL in lists, I think so...