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
sai007sai007 

Clone the object records dynamically with the related child objects and given field values

Hi all,

I Have a requirement that, If select an object from  the UI and I need to clone the  object record along with the related child objects. before cloning I need to give the name of the record  and other field values. which field values i'm providing, the object record  should be cloned along with the field values that i'm providing.
i'm success with the cloning the object record  with related child object. but i can not able to provide the field values which i'm providing. Can any one help me with this

Thanks in advance
ShirishaShirisha (Salesforce Developers) 
Hi Sai,

Greetings!

Can you please confirm,which fields are not allowing to update/edit the values.Also,please refer the sample code for cloning the record along with the child record using VF page:

https://salesforce.stackexchange.com/questions/158404/cloning-a-record-and-its-children

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Thank you!