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
DEEPALA SIVADEEPALA SIVA 

SHARE_NEEDED_FOR_CHILD_OWNER, account share row needed for owner or share of at least one account child object (opportunity, contact, etc.)

ANUTEJANUTEJ (Salesforce Developers) 
Hi Siva,

Can you elaborate the issue so as to understand the issue clearly and find a solution to your problem.

Regards,
Anutej
DEEPALA SIVADEEPALA SIVA
Hi Anutej,
when I'm trying to delete the AccountShare through Apex Trigger, getting the following error, could anyone please suggest to me how to resolve this issue...Thanks
ANUTEJANUTEJ (Salesforce Developers) 
So I tried checking the error and in the link- https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm

it states as SHARE_NEEDED_FOR_CHILD_OWNER
happens If a parent record has a child record that needs a sharing rule, you can’t delete the sharing rule for the parent record.

Can you try checking if you have all the necessary permissions.