function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jim Riggio 1Jim Riggio 1 

Adding Child Records to Parent Accounts

I have problem that I am struggling with. I need to update a NEW Child object with data from the parent.  Let me explain.

 OLD DATA MODEL
Account object  -  Account Name,  FieldA, Field B, etc

NEW DATA MODEL
Account Object  - Account Name
Channel Object (lookup relationship from Channel to Account) -  FieldA, FieldB

 FieldA from Account needs to be its own record in Channel

This is what it should look like in New Data Model:

Account  - Account Name
Channel - FieldA
Channel - FieldB
Channel - FieldC

I believe I don't need to use External IDs as I have read in previous posts, but I am confused to the correct way to set this up.
Best Answer chosen by Jim Riggio 1
Shikha AgashiShikha Agashi
Jim, then I would suggest you extract all data in excel file from Account. In this file you will have four column: AccountID, Field A, Field B, Field C.

Once you extract, split your excel file in three files like following:

File 1: AccountID, Field A
File 2: AccountId, Field B
File 3: AccountID, Filed C. 
And make sure remove any empty rows after split in Field A, Field B and Field C.

After Spliting files, use dataloader to upload all three files in Channel Object. Use Insert Operation. Map Name field(if it is Text) to Field A and Account Lookup field to AccountID. And you will have your records in child object and connected to parent object. 

All Answers

Shikha AgashiShikha Agashi
Is Account Name Parent Account and Field A, Field B are sub accounts currently?
Jim Riggio 1Jim Riggio 1
Hi Shikha,  No, all fields currently reside in the Account Object. The Channel object is new and Lookup to Account. The New Data model is currently built...Account Parent with Channel Child.
Shikha AgashiShikha Agashi
Jim, then I would suggest you extract all data in excel file from Account. In this file you will have four column: AccountID, Field A, Field B, Field C.

Once you extract, split your excel file in three files like following:

File 1: AccountID, Field A
File 2: AccountId, Field B
File 3: AccountID, Filed C. 
And make sure remove any empty rows after split in Field A, Field B and Field C.

After Spliting files, use dataloader to upload all three files in Channel Object. Use Insert Operation. Map Name field(if it is Text) to Field A and Account Lookup field to AccountID. And you will have your records in child object and connected to parent object. 
This was selected as the best answer
Jim Riggio 1Jim Riggio 1
Thanks shikha... this works great