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
abinayaabinaya 

custom clone button with selected fields

hi team,

Kindly help me how to clone the record with the selected field values. This should redirect to the edit page of the new cloned record

Regards,
Abi

Ramu_SFDCRamu_SFDC
This can be accomplished in 2 steps.

1. Create a custom button to execute the trigger. Follow the guidelines explained in this post http://sfdc.arrowpointe.com/2009/01/08/invoke-apex-from-a-custom-button-using-a-visualforce-page/ 

2. The cloning logic as per the post at the link http://sfdc.arrowpointe.com/2011/03/28/cloning-records-in-apex/ which explains how to go about cloning the records. All you need to do is to query for the fields that you want to clone leaving others. 
abinayaabinaya
hi ramu,

I want to create a CUSTOM clone button which will clone the record in edit mode and have to null few field values and then user can change some values and save the record.
Ravi_SFDCRavi_SFDC

Hi Ramu,

Can you provide the updated link to follow the guidelines. As the link which you have provided doesn't work as on date. Request you to do provide the updated link. Thank you in Advance.