I am trying to get a list of OpportunitiyHistory for selection of Opportunities I do:
// Get all the opportunities modified in a date range.
List<Opportunity> opportunities = [SELECT Opportunity.OwnerId, Owner.Name
FROM Opportunity
where Opportunity.LastModifiedDate = LAST_N_DAYS:7];
// Now get the corresponding history for these opportunities
List<OpportunityHistory> oppHistories = [SELECT Id, Probability, OpportunityID
From OpportunityHistory
where OpportunityID in:=opportunities];
I get:
Multiple markers at this line
- Save error: unexpected
token: '='
- unexpected token: '='
Any ideas what I am doing wrong?
WHERE OpportunityID in :opportunities
, at the moment you haveWHERE OpportunityID in :=opportunities