I'm just curious to know that when I create a sharing rule for account via sharing settings. I want to know on which object the sharing rule record is getting stored when I create the sharing rule for account object.
1 Answer
Sharing rules are usually present in the metadata .So metadata API will have definitions of your rule .
Salesforce recommends to use this for all updates to sharing rules .
However under the hood salesforce has tables named as "OwnerSharingRules" for each object where you have these sharing rules .
However to enable these object for your org you will need to contact salesforce for same .
Check the documentation on the same here in SOAP API GUIDE .You will see for Account we have AccountOwnerSharingRule Object .
-
Thank you Mohit. I have a follow question how to view this object in workbench because I'm getting an error invalid sobject.– prasanthCommented Jan 6, 2017 at 12:31
-
To enable the object you will need to contact salesforce support first . Commented Jan 6, 2017 at 12:32
-
Thank you for information. Suppose if we want to delete all of the manually defined sharing rule for the account object . Could you please suggest me a best practice?– prasanthCommented Jan 6, 2017 at 13:01
-
1You will need to use destructive XML for deletion .I would recommend to explore that option Commented Jan 6, 2017 at 13:03