Using Apex Data Loader to load records into an object with a master data ratio

I need to upload data to two objects. I can load data into a single object using a data loader. The second object is related to the main data of the first object, so I need to have a unique record identifier for the records of the first object in the CSV file. How to add this record identifier to a CSV file?

+3
source share
2 answers

You can load the "master" records after the initial loading and perform a mapping with the name (Name → Id). In Excel, this can be achieved using VLOOKUP. Once you have created a new list of "detail" objects, there should be no problem loading them. The "ID-> uploaded records" display is also available in the success log file created by Apex Data Loader.

- " Salesforce, ":) , "" - . "" , Salesforce. Salesforce ( ) " ". Salesforce, . :

Salesforce

INSERT INTO detail_object (Name, SomeValue, master_ID) VALUES ("foo", "bar", [some valid salesforce id])

salesforce

INSERT INTO detail_object (Name, SomeValue, master_ID) VALUES ("foo", "bar", (SELECT Id from master_object where some_field_marked_as_external_id = "123")

Data Loader , ( , ?), , .

+4

Apex Data, 3 :

1: ().

2: , , . VLOOKUP .

, , , URL- .

3: -

+1

Source: https://habr.com/ru/post/1756174/


All Articles