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
pokalakari nagapokalakari naga 

Clone the related list along the parent record

Hi all,

Can we clone the record along with the related list records. Can we achive this with the custom clone button or we need to create custom clone button.
If we need to create a custom clone button can anyone please help me over here.

Thanks in advacne,

Regards,
naga.
GauravGargGauravGarg
Hi Naga,

This can be achieved, need to perform following operations:
  • Create a Class
    • Query the Current Records details and clone it, and insert. 
    • Query all the related parent records and clone them. In their Relationship Field put the currently inserted record Id. 
  • Create a custom button
    • Call recently build class 
    • place this button on Page layout. 
Hope this helps. 

Thanks,
Gaurav
Skype: Gaurav62990
Sandhya Marella 4Sandhya Marella 4
Hi GauravGarg,

Can you plese post the code how you achive this , i came up with the same requirement.

thank you!