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
VINODKUMAR REDDY KALUVAVINODKUMAR REDDY KALUVA 

ParentId is not accepting in Accountshare object

Query:
 
select id,ParentId,UserOrGroupId from AccountShare
When I'm querying this in queryeditor it is giving this error? 

ERROR:


select id,ParentId,UserOrGroupId from AccountShare
          ^
ERROR at Row:1:Column:11
No such column 'ParentId' on entity 'AccountShare'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

Please let me know, thank you :)
Best Answer chosen by VINODKUMAR REDDY KALUVA
ShirishaShirisha (Salesforce Developers) 
Hi VinodKumar,

Greetings!

The AccountShare Object represents the sharing entry on an Account which doesn't have the Id and ParentId fields in it.

You can see all the available fields in the below document and sample code to find out all the sharing rules an user has assigned to.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_accountshare.htm

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri