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

clone button

Hi all,

Clone is a standard button or Custom button.If it is custom button can any one provide me code behind the clone button for cloning particular records.

Ankit AroraAnkit Arora

It's a nativ button. You can also make a custom button and clone the record.

Here is the method : clone(preserveId, isDeepClone, preserveReadonlyTimestamps, preserveAutonumber)
Creates a copy of the sObject record.

And here is the detail description :

Ajay K DubediAjay K Dubedi
Hi Mubarak,
Clone is a standard button in salesforce which onClick copy exactly the same behaviour of Page to another.
You can make the custom clone button also, for that you may take help from the link provided:-
I have page where if i click clone, the records in one fields need to clone to another field.
I include clone method but its not working.

Santiago GalmariniSantiago Galmarini

I have this custom clone button created by the consultant on my opp object


The problem is that it clone and save it jumping the edit mode.
any idea how to add the edit step to this?