Manual sharing records can be created by inserting the share settings to an object using Data Loader. To determine if a standard object supports sharing rule creation via the Data Loader, review Introducing SOAP API and search for the object name plus share (ie AccountShare). If you cannot find the object, it doesn't support sharing rule creation via the Data Loader (ie EventShare and TaskShare).
Create a CSV file that includes three columns:
1. Record ID - This column should be labeled AccountID, CaseID, LeadID, or OpportunityID, depending on the object you are working with. You can obtain the record IDs by creating and exporting a report that lists the records you want to share, including the Salesforce ID.
2. UserOrGroupID - The ID of the User or Public Group that you are granting access to the record. You can get the User ID by creating and exporting a User report. Using the Data Loader, you can export the User or Group table.
3. Access Level - The column should be labeled AccountAccessLevel, CaseAccessLevel, LeadAccessLevel, or OpportunityAccessLevel, depending on the object.
One of the following values must be used:
| AccountID | UserOrGroupID | AccountAccessLevel |
| 001000000012345 | 005000000023456 | Edit |
For example:
After preparing your .csv data file, use Data Loader to insert (create) records in the appropriate sharing table, such as AccountShare, CaseShare, LeadShare or OpportunityShare. You can access these by clicking on the "Show all Salesforce objects" checkbox in the Data Loader at the step where you select data objects.
Your new sharing rule entry will appear as a "Manual" sharing rule, as if it was created by clicking the "Share" button on the record directly in Salesforce.
Note the following behaviors on sharing object availability for custom objects in the Data Loader:
Custom objects that meet the criteria above are available for selection in the Data Loader and appear in the "Show all Salesforce objects" view as: Share: CustomObjectName (CustomObjectName__Share)
See Also:
Install Data Loader
000385389

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.