You need to sign in to do that
Don't have an account?

Creating relationship between 2 objects while importing data in Salesforce
Hi,
I am trying to import data from a csv file to multiple objects in a single action. My csv file is like this..
S.No. Column 1 Column 2
(Parent) (Child)
1. A1 -
2. B1 A1
3. C1 B1
4. D1 A1
So, in a way, B1 and D1 are child of A1 and C1 is child of B1
Now I have traversed all csv lines to creat 4 records for A1, B1, C1 & D1 and fetched them in a list. Now I have a parent field in each record named 'Parent Id' which should be null, Id of A1, Id of B1, Id of A1 respectively. I don't want to go with matching names for records because the names might repeat and the code might find 2 records with same name and won't work. But how to fetch the ids in correct places then? Do I need another column to uniquely identify them? What to do?