News Ticker

How to clone a record in Dynamics CRM 2013?

One of the common requirements I hear from customers is “can I clone a record in Dynamics CRM?” Usually the need for cloning arises to avoid duplicate data entries and to minimize errors in the process. Well, Dynamics CRM does not provide any out-of-the box feature to clone a record to create another. However, it does have the framework to get the work done.

Here I would provide a very simple way to implement the cloning functionality without writing any code, not even JavaScript!  Don’t believe. Check it out.

The illustrated mechanism works if we just want to clone the direct data fields, but not any related records. For example, we want to clone a lead record to create another however, the connections of the lead record is not required to copy to the cloned record.

To implement such a cloning functionality, we need to create a self-reference for the entity. In our example, we will create a 1: N relationship between lead entity itself.

Step 1: Create a self-referential 1: N relationship


Step 2: Map the fields to be copied when the clone is created


Step 3 (optional but provides clean implementation): Use Ribbon Workbench* to Hide the “Add Existing Lead” button and rename the “Add New Lead” button to “Clone Lead” along with tool tip etc.. Changes accordingly.

RibbonWorkbench Solution


*RibbonWorkbench solution for Dynamics CRM 2013 can be downloaded for free from the following location:

Step 4: Publish all the customization.

To check the result, now navigate to the Sales | Lead section and pick up a lead record. Then navigate to the associated records section (as shown below). You can find Cloned Leads.


Click on Cloned Leads. You can see the “Clone Lead” button on the screen.


Click on the Clone Lead button. Bingo! A Quick Create Lead opens up copying the data from the existing record. Our clone functionality is working.


Happy Cloning!!

About Dipankar Bhattacharya (59 Articles)
A multi-skilled Dynamics 365 Professional with strong experience in delivering IT projects especially across multiple industries. A Microsoft technology evangelist, a regular speaker at tech events, blogger and avid reader. Certified IT Architect and well versed in Solution Architecture of Business Applications using Microsoft platforms like Dynamics 365, Azure and Office 365.

8 Comments on How to clone a record in Dynamics CRM 2013?

  1. Hi Dipankar: What if I created a support contract entity with a related license entity. But I need to clone the support contract which will change the contract number and alienate the licenses which are related by contract number? How would you handle that?

    • Hi Olga : when you clone a support contract, I’d like to assume that you’d like have a new contract number, after all the cloned record is a different contract altogether.

      As far as related records (N:1 relationships) like License(s) linked to a support contract is concerned; there exists no configuration to copy them over to the cloned record. However, a custom plugin can do the job. When a support contact is cloned, a plug-in can copy the license to the cloned record.

  2. Tevi Livestain // January 7, 2015 at 2:20 PM // Reply

    What a lot a bother for something you can do as standard in salesforce.

  3. Hi Dipankar,

    Very neat technique. My requirement was fullfilled exactly with this implementation. Thank u very much.

    But, the only problem is I am doing this for incident entity and I have a custom auto number plugin that generates unique identifier each time a new incident record gets created. Now, with this approach, the plugin does not get triggered and a system generated auto number is getting created. What do you think I have to tweak to get my plugin triggered even in this approach.


  4. Hi Roxana, Is the plug-in synchronous? Check the logic of the plugin…whether it is validating any condition which is not satisfied by the cloned record. Normally, there shouldn’t be any problem with a synchronous auto-numbering plugin.

    • Yes, it is a synchronous plugin. I think the problem is with the mapping fields. I used Case Title field in the plugin to display the auto number. And when I followed your article to create self referencing relationship, the system generated auto mapping on Case Title field which I cannot delete. I think this is creating confusion in showing the custom auto number. Could this be the issue?
      Thanks for your quick reply. Appreciate it.

  5. What about for sub grids….

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: