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
Michaela ChrysostomouMichaela Chrysostomou 

clone button in Lighnting

While cloning a record, is it possible to copy only certain field values. I want some fields to be empty whichmeans it should not contain the existing value. In the classic we did this by passing parameters in the URL. How we can do this in Lightning now? 

Please help me. 
NagendraNagendra (Salesforce Developers) 
Hi Michaela,

This can be done simply by first querying the record you wish to clone, and only querying for the fields you wish to be filled. Any field which is not included in the query will not be filled out on the clone, with the obvious exception of fields like CreatedDate which are set by the system.

For more information please check with below link which might help you further. Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
Michaela ChrysostomouMichaela Chrysostomou
Hi Nagendra thank you for your reply, do you have any sample code on that ?