Loading

Get a list of Enhanced Notes or Files from any object with Data Loader

Fecha de publicación: Oct 13, 2022
Descripción

To generate a list of Files or Notes related to an object, you need to set a criteria either by LinkedEntityId (Parent) or ContentDocumentId (File). Using a Parent relationship query, you can filter using all record Ids from a specific object.

ContentDocumentLink records are now also included in scheduled data exports, see Include File Links in Weekly Data Export for more detail.
 
Solución


To export data with the Data Loader, rather than the Weekly Data Export feature, use the steps below to export ContentDocumentLink filtered by object.
 

  1. Launch the Data Loader
  2. Click Export
  3. Click "Show all Salesforce objects"
  4. Select Content Document Link and click Next
  5. Insert or build a query by selecting desired fields like the one below, modified to include the desired object and click Finish:

Select Id,ContentDocumentId,ContentDocument.Title,LinkedEntity.Name,LinkedEntityId FROM ContentDocumentLink WHERE LinkedEntityId IN (Select Id FROM [Insert Object Name Here] )

Alternatively, you may use the following example query to get a list of records related to a particular ContentDocument Id (069) or list of Ids:

SELECT ContentDocumentId,LinkedEntityId FROM ContentDocumentLink WHERE ContentDocumentId IN ('0690M000008wt7O','0690M000007zLt6'...)

Reference the ContentDocumentLink documentation to review all available fields for export, and modify the query above as needed.


Note: The above query will fail when exporting Tasks or Events. Consider using an alternative API client tool that allows for the following nested query syntax and inserting either Task or Event for the object name:

Select Id,( Select Id, ContentDocumentId, LinkedEntityId, ShareType, Visibility From ContentDocumentLinks ) FROM [Insert Object Name Here]

Data Loader does not currently support the nested query example above and will return an error, "Invalid soql: Nested queries are not supported" upon attempting to Export. Please consider creating or promoting an Idea so that we may see support for this added to Data Loader with a future release.
 

Número del artículo de conocimiento

000381988

 
Cargando
Salesforce Help | Article