I am trying to return fields from all "Billing" contact role Ids, that an Opportunity record may have.
I wish to end up with a map in my opportunity trigger that has opportunity Id and the list of associated contact role Ids (i.e. Map>)
I can create the map keys from looping trigger.new but cannot seem to find a way to insert the list of contact role Ids from my SOQL query.
List<OpportunityContactRole> contactRoleList
= new List<OpportunityContactRole>([Select Id
From OpportunityContactRole
Where Role = 'Billing'
And OpportunityId in :listOfTriggerOppIds
]);
I can put the rest of the code in if required but seeing as it doesn't actually work, I thought it might confuse things.