Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ContentHubItem
Special Access Rules
Chatter and Files Connect must be enabled for the organization.
Supported Calls
describeSObjects(), query(), search()
Fields
| Field Name | Details |
|---|---|
| ContentHubRepositoryId |
|
| ContentItemSize |
|
| ContentModifiedDate |
|
| ContentSize |
|
| Description |
|
| ExternalContentUrl |
|
| ExternalDocumentUrl |
|
| ExternalId |
|
| FileExtension |
|
| FileType |
|
| IsFolder |
|
| MimeType |
|
| Name |
|
| Owner |
|
| ParentId |
|
| Title |
|
| UpdatedBy |
|
Usage
The following SOQL query examples show how to retrieve files and folders from a Files Connect external data source. These examples use placeholders for ID values for the repository ID and folder IDs. Before running these queries, replace the placeholders with valid ID values for your external data source and folders.
Example 1: Get the ID and name of the root folder in an external file source.
Example 2: List all folders and files under the specified root folder.
Example 3: List all external file data sources by querying ContentHubRepository.
Example 4: List all files and folders in a given folder and external file source.
Example 5: To return only folders in the result set, add IsFolder = true in the WHERE clause to a query that returns files and folders. For example, the following query lists all folders under the root folder.
Example 6: Retrieve a link that is used to open the specified document in an external source.
SOSL Example: Retrieve the ID and name of all documents that contain the search string. The result set is limited to the first 10 documents.