Help Center

Dataload: File Attachments (Changes and Quality and Declarations)

Intended Audience: Propel Consultants and Partners and experienced Salesforce Administrators who are comfortable working with large data sets and importing directly into Salesforce custom objects.

Note to Users: If you need to import data from a spreadsheet or CAD system please see the article Import Item Data. The Propel import tool is designed for Propel users and provides an easy way to import data for most use-cases.

Scope: This document describes how to load data into Propel for large sets of data, and particularly for dataloads containing multiple revisions of Items, BOMs and AML, where each revision must be released. Typical data sets include data from legacy PLM and ERP systems.

Tools: This article discusses loading data using standard Salesforce import tools: the Import Wizard and Data Loader. Prior knowledge of these tools is assumed. See our article on Bulk Updates for details about how to use the Data Loader.

Required Privileges: You must have Salesforce System Administrator privileges to use the tools referenced in this article.

Disclaimer: Propel Support is not responsible for data integrity errors or data loss resulting from importing data directly into Salesforce custom objects. It is assumed that the reader of this article is experienced with Salesforce objects and schema and has prior experience performing data migrations.

Technical Support: The Propel Support organization cannot assist with data migration efforts. You may choose to contract with Propel Implementation Services for paid assistance with these activities.

Environment: It it strongly recommended that you perform dataload activities in a Sandbox environment first.

Prerequisites: Your user account must have the permission set Propel Override Business Rules. In addition, all Item objects to which you intend to associate file attachments must already exist.

 

FILE ATTACHMENTS (Changes, Qualities and Declarations)

This document describes how to bulk-load file attachments onto Propel Changes, Quality and Declarations.

You will follow these general steps to bulk-load file attachments onto these objects:

A. Upload all files to Salesforce
B. Get the IDs for the files you previously uploaded
C. Get the IDs for the records to which you are attaching the files
D. Merge Values into your Import File
E. Run the Data Loader to associate records with file attachments

 

A.  Upload All Files to Salesforce

1. Display the Salesforce Files tab.

2. Drag all your files into the Salesforce Files area.

 

B.  Get the IDs for the Files You Previously Uploaded

1. Use the Salesforce Data Loader to run a query (export) on ContentDocument:

2. From the DataLoader, choose Export

Check the box “Show all Salesforce objects”
Choose the object ContentDocument
Export these fields:

ID
Title (this is where the filename is stored)
FileExtension
LatestPublishedVersionId

 

C.  Get the IDs for the Records to Which You Are Attaching the Files

1. Use the Salesforce Data Loader to run a query (export) on the object to which you are attaching the files (Change, Quality or Declaration):

2. From the DataLoader, choose Export

Choose your object
Export these fields:

ID
Name

 

D.  Merge Values into your Import File

     1.   Combine and match the IDs from the ContentDocument export and the target object export.

      2.  Your resulting combined dataset should include the following columns
                        File Name
                        Object ID
                        ContentVersion ID
                        Type  (set all rows to “ContentPost”)
                        Visibility  (set all rows to “InternalUsers”)

 

 E.  Run the Data Loader to Associate Records with File Attachments

1. Open the Salesforce Data Loader

2. Use the Insert operation

3. Select “Show all objects”

4. Select the standard object FeedItem

 

5. Map the following headers to fields:

            Object ID = ParentId
            ContentVersion ID = RelatedRecordId
            Type = Type
            Visibility = Visibility
            File Name = Body

6.  Start the import.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.