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
John-Henry GrossJohn-Henry Gross 

Get sharing related object information via API


We can set sharing settings for objects through Setup --> security control --> sharing rules in Salesforce.
After that we can get those security information through API’s object share table. i.e If I change sharing settings for Account object then I can access them via AccountShare table.
But there are few objects those have share tables. i.e. Contract, Document, Group, Idea, Task etc ..
How can I get sharing information for those objects?
pbattissonpbattisson
The reason these objects do not have sahring records is that sharing is managed for them. Some examples from your list:
  • Contract - child of Account so Account sharing applies
  • Document - child of Folder which controls the access via the AccessType field. Is Hidden, Public or Shared 
  • Group - this object controls visibility to other items but is accessible by any user - no special permission needed
You can see the data model for groups of objects and how they interact here (http://www.salesforce.com/us/developer/docs/api/index_Left.htm#StartTopic=Content/sforce_api_erd_activities.htm) (I have linked to the ERDs for data model) as well as getting a full list of the objects for use.