function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Deleted Opportunity Line Items

So I have an opportunity with some line items. If I delete a line item from the opportunity and then use queryAll(), I would expect to see this record with its isDeleted field as 1. However, the queryAll() is not picking up the deleted line item. I looked in the recycle bin for the deleted line item and it's not in there.

Has anyone else come across this?

I'm not sure I have an explanation for why, but I believe what you described is the behavior for detail records in a master-detail relationship like Opportunity and OpportunityLineItem. If you deleted the opportunity itself, then the OpportunityLineItem records would have isDeleted=false, but if you delete the item, I don't think it gets put in the recycle bin and just gets deleted permanently.


Message Edited by ryan_marples on 12-07-2008 10:39 PM
Which is why there's a getDeleted call.