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
IcaroIcaro 

How To Clone Master Detail

Hi,

I Have 4 Objects Ob1 is master from Ob2 and Ob2 Is Master from Ob3 and Ob3 is Master from 4.

There is any way to create a button in Ob1 to clone it and all the details ?

I'm Starter in SalesForce so, examples will be great.

Thank You

rodrigoBFrodrigoBF

It will be necessary to create a trigger to replicate the child records of old master detail object to the new master object detail record.

 

SoleesSolees

Simple,

 

1. Export first object

2. Import and get the New Id

3. Excel VLOOKUP for the first Child

4. Import and get the New Id

5. Excel VLOOKUP for the second Child

6. Import

 

cheers

 

ps. Always leave the Old_Id as a column in the excel file, and use the VLOOKUP for matching old ones and new ones.