I have a trigger on the OpportunityLineItem
acting after delete
. From that trigger, I want to query all the Opportunities
associated to the OpportunityLineItems
deleted to see if they still have other OpportunityLineItems
associated to them.
The Opportunity
SObject has to field that should help me with that:
HasOpportunityLineItem
TotalOpportunityQuantity
The problem is that the value of this field doesn't seem to be accurate when I query it after
the action.
Am I missing something? If not, what is an efficient way of achieving this?