web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Cloning Records in Dynamics CRM

(1) ShareShare
ReportReport
Posted on by 792

 Hello,

What is the best approach to clone records in CRM (specifically quotes and orders and their respective line items)?

I know this can be done by using an ASP.NET page and many other ways.

I also want to open the cloned record to user when the cloning process finishes.

Thanks :)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,

    You can try below approach.

    dipankarbhattacharya.com/.../cloning-a-record-in-dynamics-crm-2013

    Mansoor

  • Suggested answer
    Community Member Profile Picture
    on at

    How about to create on demand workflow in order to create clone records?

    And In the quotes  view, check the target record and run the workflow.

  • zmk Profile Picture
    792 on at

    Thanks for the replies. However, Mansoor answer only copy direct data which is not my case. As for daehyun, using OOTB workflow  won't open the cloned record once created and also copy direct data.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,

    You can add a custom button on the entity form. On the button click, you can add JavaScript code to launch a dialog. The dialog will create a new record of the same entity with the required details. Also, you can mention the link of the newly created record in the dialog (on a page).

  • Suggested answer
    VMarques Profile Picture
    200 on at

    Try this free Solution by Cobalt. I've been using this for the last few months and its a great tool to duplicate any record... No need to write code. 

    http://www.cobalt.net/dynamics-crm-snapshot

    Here's a video that show how to clone invoices, but it can be done with any entity. 

    https://www.youtube.com/watch?v=Iti9nfgomDg

    Hope this helps.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Whether it is to clone- Quotes, Orders or any entity including their respective line items can be done with just 1 click using WORK 365 Record Clone App. You may check the free trial at https://www.work365apps.com/record-clone

    Yes, once you click on the clone button the new cloned record pops up and is ready to use/edit as per the need.

    Hope this helps, for any more details ping me at  ella@work365apps.com

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Create a button called Clone (as suggested in previous comments), and call an Action from it.

    You can use process.js to call the Action:

    github.com/.../processjs

    You can use a workflow to set the values or use the following code using a plugin (sample is for Case Entity):

    The logic is pretty simple. You will need to retrieve your case entity record, and create a new case (which will return your new case id).

    Then you need to do a retrieve multiple on all child records, and do a create for each one. See sample below:

    Entity sourceCase = service.Retrieve("incident", caseId, new ColumnSet(true));

    Guid targetCaseId = CreateCase(sourceCase);

    // Retrieve All Child Records of Case

    // You will need to do this for each type of child record

    EntityCollection childRecords = service.RetrieveMultiple(query);

    if (childRecords.Entities.Count > 0)

    {

       foreach (Entity child in childRecords.Entities)

       {

          // Similar logic as the Create Case function

          CreateChildRecord(child);

       }

    }

        private Guid CreateCase(Entity sourceCase)

        {

            Entity targetCase = new Entity("incident");

            foreach (KeyValuePair<String, Object> attribute in sourceCase.Attributes)

            {

                string attributeName = attribute.Key;

                object attributeValue = attribute.Value;

                switch (attributeName.ToLower())

                {

                    case "scag_incidentid":

                        break;

                    default:

                        targetCase[attributeName] = attributeValue;

                        break;

                }

            }

            try

            {

                Guid targetCaseId = service.Create(targetCase);

                return targetCaseId;

            }

            catch (FaultException<OrganizationServiceFault> ex)

            {

                throw new InvalidPluginExecutionException("An error occurred in the Case function of the plug-in.", ex);

            }

        }

    Hope this helps.

  • Zap Objects Profile Picture
    924 on at

    You can take trial of ZapObjects Copy Record App too:
    https://zapobjects.com/apps/zap-copy-record/

    The app allows copying or cloning of record in single click. Once cloned, the newly created record is automatically opened up too!

  • Inogic Profile Picture
    682 on at

    Hi Zmk,

    Kindly check the below tool which will satisfy your needs. Apart from copying data of quotes and orders and their respective line items, this tool also offers options to copy the data from one entity record to another entity along with the relationships. Using this tool you can open newly created record. You can also update the newly records while cloning the records.

     

    https://www.inogic.com/product/productivity-pack/click-2-clone-microsoft-dynamics-crm-records

     

    Thanks!

  • Suggested answer
    MS CRM developer Profile Picture
    50 on at

    i came across the same scenario, but looking for Javascript command, Kindly suggest me.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans