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
nyhansanyhansa 

Error: action="{!clone}": Unknown method 'O__cStandardController.clone()'

I'm creating a custom Visualforce page to override the standard page layout of a custom object, however I'm having an issue when it comes to adding a clone button to the Visualforce page. On the standard page layout for this custom object, I'm able to view and use the Clone button. For some reason, when I try to add the same Clone button to the Visualforce page, I get the following error:

 

Error: action="{!clone}": Unknown method 'O__cStandardController.clone()'

 

Am I doing something wrong? I checked the metadata for my custom object, and there is a clone action in the metadata. It seems silly to me that even though it's there on the standard page layout, I can't access it when creating a Visualforce page so I'm guessing I'm calling the action incorrectly.

 

I'd really appreciate any help! I have only the most basic knowledge of creating extensions, so I'd rather avoid doing so if I can.

 

Thank you!

Best Answer chosen by Admin (Salesforce Developers) 
Abhay AroraAbhay Arora

Hi,

 

You have to write the custom code for this and call the clone function from your apex code.

 

 

http://boards.developerforce.com/t5/Visualforce-Development/How-to-replicate-Standard-Clone-Behavior-for-VF-Page/td-p/169342

 

Above will solve your issue

 

 

All Answers

Abhay AroraAbhay Arora

Hi,

 

You have to write the custom code for this and call the clone function from your apex code.

 

 

http://boards.developerforce.com/t5/Visualforce-Development/How-to-replicate-Standard-Clone-Behavior-for-VF-Page/td-p/169342

 

Above will solve your issue

 

 

This was selected as the best answer
nyhansanyhansa

Thank you so much, Abhay!