I am totally lost on this, I am trying to delete an opportunity share record using dev console as well as workbench. I am unable to delete the record with Rowcause = "Implicit Child"
List<opportunityshare> oshare = [select id from opportunityshare where OpportunityId=:'006460000032bsR'];
//Trying to delete the first entry.
delete oshare[1];
System.DmlException: Delete failed. First exception on row 0 with id
00txxxxxxxxxxxxxxxxxxx; first error: INVALID_CROSS_REFERENCE_KEY, id
does not exist: []
We have a custom account team structure and a trigger on this object inserts standard account team which later creates an oppty sharing insert.
Is there a way to delete the record with rowcause='Implicit child'?
Best Answer
No. The only share records you are free to insert/update/delete are those with a RowCause of "Manual" and, for custom objects, any RowCause that is a custom type used with Apex Managed Sharing.