[SalesForce] Provide standard clone button functionality to a button on vf page

I have an object whose standard new, edit and view button are overridden with a vf page.I want a Clone button on this vf page which should work exactly like standard clone button. If suppose i open an existing record and click on this clone button on vf page it should load the vf page again and should prepopulate all the field of the old record. I should be able to change the field values and when i click on the save button(already present on the vf page) a new record should be generated.
How can i achieve this clone functionality ?

Best Answer

Add a custom button that redirects to /RecordId/e?clone=1

This opens the record in Edit Mode as a clone of the original record.

Related Topic