Represents the settings for
enhanced analytics folder sharing. Users can control access to reports
or dashboards by giving others Viewer, Editor or Manager access to
the folder that contains the report or dashboard.
File Suffix and Directory Location
FolderShare
objects are stored in the reports and dashboards directories. For each report or dashboard folder
it contains, there is a metadata file named FolderName-meta.xml. The FolderName-meta.xml metadata file contains the metadata information
for that folder, such as the accessLevel. For
example, if the reports directory contains a
reports folder named myReportsFolder, it also
has a myReportsFolder-meta.xml file at the same
level as myReportsFolder.
Version
FolderShare components are available
in API version 28 and later.
Fields
| accessLevel |
FolderShareAccessLevel (enumeration of
type string)
|
Required. Specifies the combination of actions that can be
taken on the folder. Valid values are:
-
View. User can run a report
or refresh a dashboard, but can’t edit them. All users have
at least Viewer access to report and dashboard folders that have been
shared with them. (Some users may have administrative permissions
that give them greater access.)
-
EditAllContents. Users can
view and modify the reports or dashboards in the folder, and move
them to and from any other folders that they have equivalent access
to.
-
Manage. Users can do everything
Viewers and Editors can do, plus control other users’ access
to a folder.
|
| sharedTo |
string |
Required. Specifies the user, group, or role that has the specified
access level to the folder. |
| sharedToType |
FolderSharedToType(enumeration of
type string)
|
Required. Specifies the type of entity that the folder is shared
with. Valid values are:
-
Group. Users in a specified
public group have the specified access level to the folder.
-
Manager.
Available in API version 29.0 and later.
-
ManagerAndSubordinatesInternal. Available
in API version 29.0 and later.
-
Role. Users with a specified
role have the specified access level to the folder.
-
RoleAndSubordinates. Users
with a specified role, and users with a role subordinate to that role,
have the specified access level to the folder.
-
RoleAndSubordinatesInternal. Users with a specified role and users with a role subordinate to
that role, except public portal users, have the specified access level
to the folder.
-
Organization. All internal
users have the specified access level to the folder.
-
Territory. Users in a specified
territory have the specified access level to the folder.
-
TerritoryAndSubordinates.
Users in a specified territory, and users in territories subordinate
to that, have the specified access level to the folder.
-
AllPrmUsers. All PRM Portal
users have the specified level of access to the folder.
-
User. The specified individual
user has the specified level of access to the folder.
-
PartnerUser. The specified
individual user of a partner portal has the specified level of access
to the folder.
-
AllCspUsers. All Customer
Success Portal users have the specified level of access to the folder.
-
CustomerPortalUser. The specified
individual user of a customer portal has the specified level of access
to the folder.
-
PortalRole. Users with a
specified role in a portal have the specified access level to the
folder.
-
PortalRoleAndSubordinates. Portal users with a specified role, and portal users with a role
subordinate to that role, have the specified access level to the folder.
|
Declarative Metadata
Sample Definition
The following is an example of a
FolderShare component for a dashboard folder:
1<?xml version="1.0" encoding="UTF-8"?>
2<DashboardFolder xmlns="http://soap.sforce.com/2006/04/metadata">
3 <folderShares>
4 <accessLevel>View</accessLevel>
5 <sharedTo>R1</sharedTo>
6 <sharedToType>Role</sharedToType>
7 </folderShares>
8</DashboardFolder>
This is an example of a FolderShare
component for a report folder:
1<?xml version="1.0" encoding="UTF-8"?>
2<ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata">
3 <folderShares>
4 <accessLevel>View</accessLevel>
5 <sharedTo>R1</sharedTo>
6 <sharedToType>Role</sharedToType>
7 </folderShares>
8</ReportFolder>