Override the Clone button with a VF page - CaseClone.page - no pageAction method but associated to a Case Controller Extension apex class SFDC will tell you you are doing a clone because of URL param clone=1 In the constructor, retrieve the data from the source Case and populate an SObject that is bound to the VF page's fields. When the constructor returns, the page is populated as a normal 'new' Case page with various inputFields and outputFields per your design. Let the user change any of the defaulted, to-be-cloned fields. These changes will be posted back to the controller extension in step 5. Have the VF page include a 'Save' button bound to a 'doClone' action in the controller extension. 'doClone()' does the DML using the sobject you instantiated in step 3, and when done, redirects to the standard Case View page of the clone target Case.
Cancel works as expected, it will go back to the clone source Case standard view.
Override the Clone button with a VF page - CaseClone.page - no pageAction method but associated to a Case Controller Extension apex class
SFDC will tell you you are doing a clone because of URL param clone=1
In the constructor, retrieve the data from the source Case and populate an SObject that is bound to the VF page's fields. When the constructor returns, the page is populated as a normal 'new' Case page with various inputFields and outputFields per your design.
Let the user change any of the defaulted, to-be-cloned fields. These changes will be posted back to the controller extension in step 5.
Have the VF page include a 'Save' button bound to a 'doClone' action in the controller extension.
'doClone()' does the DML using the sobject you instantiated in step 3, and when done, redirects to the standard Case View page of the clone target Case.
Cancel works as expected, it will go back to the clone source Case standard view.
Please follow the below link for more info
http://salesforce.stackexchange.com/questions/30459/best-approach-to-cloning-records-with-rollback/30479#30479
Best Regards
Naga kiran