Loading

Add Content to the Files related list for records

Дата публикации: Oct 13, 2022
Описание
This article only applies if Content or Files already exist. If Files or Content do not exist, please refer to the documentation Upload Content with the Data Loader for more details.

In Salesforce Classic, content can be associated to records by Creating Content Deliveries from a record's 'Content Deliveries' related list.

Since the Content Delivery related list is not available in Lightning, admins may need to move content contained in a record's 'Content Deliveries' related list over to its 'Files' related list in order to allow Lightning users to easily see and review which Files are associated to a record.

The association between content or files and a record is stored within the ContentDocumentLink object. It's possible associate existing content or files to a record by preparing a CSV to insert records into the ContentDocumentLink object. This will effectively add the content or file to the record's Files related list.
 
Решение

Add or associate existing content or files to a record's Files related list:


Note: These instructions are for moving content on a record by record basis and one Content Document at a time.

1. Use Data Loader to Export Data to gather existing file or content record Ids from:

A) The 'Content Delivery (ContentDistribution)' object for a list of content deliveries associated to records in order to move them from the 'Content Deliveries' to the 'Files' related list.

Example export query: SELECT ContentDocumentId, RelatedRecordId, RelatedRecord.Name FROM ContentDistribution WHERE RelatedRecordId != null

B) The 'Content Document (ContentDocument)' object including the Id and any additional fields you may need to identify desired Content or Files.

Example export query: SELECT Id, Title FROM ContentDocument

Note: ContentDocument Ids can also be found by navigating to a File detail page or Content record. The Id is contained in your browser's URL and begins with '069'.

2. Create a CSV file with the following columns:

ContentDocumentId - The Id of the file or content from the previous step's export.

LinkedEntityId - Id of record for which you would like to add the content or file to its Files related list. See Unique Record IDs in Salesforce for more details on locating a record's Id.

ShareType - Set this to 'V' to set access as Viewer.

3. Open Data Loader and choose Insert

4. Select the how all Salesforce objects box

5. Select ContentDocumentLink

6. Browse to select your CSV file | Next

7. Create or Edit a Map | Auto-match fields to Columns | Ok | Next

9. Finish
Номер статьи базы знаний

000383421

 
Загрузка
Salesforce Help | Article