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
clabiancaclabianca 

Clone Button

Why cant I add a clone button to a custom object with the following code:

 

    <apex:commandButton action="{!Clone}" value="Clone"/>

 

Am I missing something??

Best Answer chosen by Admin (Salesforce Developers) 
hisrinuhisrinu

Salesforce does not provide you the clone method by default... if you want to use the cloning functionality then you have to use a clone() method of an sobject which you can find from APEX guide

All Answers

hisrinuhisrinu

Salesforce does not provide you the clone method by default... if you want to use the cloning functionality then you have to use a clone() method of an sobject which you can find from APEX guide

This was selected as the best answer
clabiancaclabianca

Thanks!