Posts

Showing posts with the label Clone

Clone with Related list

Image
The standard clone button provided by Salesforce does not have the capability to clone the related list records. So I thought of creating a custom button which will clone the parent record along with the related list records up-to one level deep. For example, you can clone Account with Contacts or Opportunities with Quotes or any standard or custom object. This app also provides you the ability to select which object's child records you want to clone. Code is uploaded @  GitHub Repo Follow below steps to make it working on your Salesforce org : 1) Copy the classes and VF page from GitHub to your Salesforce org. 2) Create a button named "Clone with Related List"  on the object you want to clone. I will take the example of Account. Behavior of the button should be "Execute JavaScript" and Content Source should be "OnClick JavaScript" 3) Copy below code for the button : {!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}  window.ope