I am trying to compare a map that contains Contact ids to the Map that holds
ContactId as one of the fields that I have queried in each key-value pairs.
Map<Id, Contact> relatedContIdsMap = new Map<Id, Contact>(selectedContacts); Map<Id, OpportunityContactRole> relatedOppConRoleMap = new Map<Id, OpportunityContactRole>([Select Id, ContactId From OpportunityContactRole Where OpportunityId IN :relatedOppMap.keySet() ]);
How can I have a condition to compare the ContactIds of the map:
relatedContIdsMap to the ContactIds that are retrieved in the map:
I have come across this: containsKey(key) from the developer docs, which seems to compare the actual key of a map, but not a particular field inside a map.