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

Cloning
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.
what is the reason behind doing this? this is not the best practice. you will end up having redundant data and contacts will be duplicated and later you will need to clean all the data, which is time consuming.