United Kingdom - D365-CRM

Expand all | Collapse all

cloning records without saving

  • 1.  cloning records without saving

    TOP CONTRIBUTOR
    Posted Mar 23, 2019 06:24 PM
    Hello

    Does anyone know of a method of cloning an existing record in CRM 365 into a new record, without the new record being saved ?
    I have a situation where I'd like to be able to offer users a clone feature, but I need them to be in control of saving the new record when they have made amendments to the cloned record - before the new record is automatically saved. This is because the creation of new records triggers a couple of process workflows neither of which I want to trigger until the new record is ready.

    Any help or advice will be received with much appreciation and many thanks.

    Kind Regards

    Nigel Cole

    ------------------------------
    Nigel Cole
    CRM Administrator / Developer
    ------------------------------


  • 2.  RE: cloning records without saving

    GOLD CONTRIBUTOR
    Posted Apr 01, 2019 09:45 AM
    No obvious way I can think of but it could possibly be done with Javascript?

    Other option if you have the resource available in you could do something clever with EasyRepro too?

    If you're not able to code though, I'm not sure I have much to offer :)

    ------------------------------
    Matt Beard
    Senior Software Engineer
    Data8
    ------------------------------



  • 3.  RE: cloning records without saving

    SILVER CONTRIBUTOR
    Posted Apr 01, 2019 11:28 AM
    I have seen this done before, but cannot find the sample, it was probably for at least CRM 2011 so a long time ago.

    Basically you can use the functionality that allows you to pass parameters to the blank form to re-create the source entity:

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/set-field-values-using-parameters-passed-form

    You'd need to have some JavaScript which iterated over all the controls on the current form, before popping open a new window with the constructed url in it. Then you should have a fully populated form but not saved.

    ------------------------------
    Ben Bartle
    IBM
    ------------------------------