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

Clone record with Sub-records (same record different level)
Hi All,
Can anyone let me know how to clone record (level 1) with sub records (level 2) where records from level 2 are assigned to record level 1.
Many thanks for any help
Can anyone let me know how to clone record (level 1) with sub records (level 2) where records from level 2 are assigned to record level 1.
Many thanks for any help
I found the below code that could help writing code that clones records, can you try checking them out:
>> https://developer.salesforce.com/forums/?id=9060G000000UZsiQAG
Here is the code that is mentioned in one of the links for quick reference:
Here he is cloning the account and respective child records.
I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be used by others in the future.
Regards,
Anutej