You need to sign in to do that
Don't have an account?

Clone Button in VF Page for Replication
I need to create a button in vf page through apex code so that all the details of account and its - contact, opportunity , activity details are replicated - so that an other account gets created with the same account, contact , opportunity , activity details.
For ex., I create an account and contacts and opportunity and activity for that account . By clicking a button on vf page called - 'Clone' an other account should get created with the same contact, opp., activities. - 'A button for Replication'. It should be done clone method.
For ex., I create an account and contacts and opportunity and activity for that account . By clicking a button on vf page called - 'Clone' an other account should get created with the same contact, opp., activities. - 'A button for Replication'. It should be done clone method.
Visualforce page:
Apex Controller:
here I have cloned Account record along with Contacts.
Pleasure and please return the favor by marking the question as Closed/Resolved by clicking the Best Answer button on the solution so that If anyone have the same concern he/she can get answer as well.