Using Workflows For Cloning Records

Standard

Sometimes you need to clone records. Often people reach for the developer when this requirement comes up but you can get quite far with workflows as long as child records are not involved.

On Demand Workflows

Given this is a workflow which does not trigger off of an event but will be called by the user, we will use an on-demand workflow. Also, as there s no need to have it run immediately, we will run it in the background.

image

In this case I am cloning an Opportunity record but you can do this with any entity which a workflow can run off.

As you can see, the steps are very simple as there is only one, which is the creation step for the new Opportunity.

Creating the Clone Opportunity

The beauty of this approach is we get a lot of control on what gets copied and what does not.

image

In this case I append “- Copy” to the cloned Topic. I also add “Previous Opportunity Notes:” to the description boxes to avoid confusion. In the case of date fields we can project them forward or choose not to copy fields at all e.g. Actual Close Date.

Once we have populated all the fields we want to copy with their slugs, we publish and we are ready to go.

Running the Workflow

To run the workflow we either select our target record from a View or open the record and select “Run Workflow” from the Menu Bar.

image

Sure enough, our On Demand workflow appears.

image

Running it then creates our record which, in a few seconds, will appear in our Opportunity View.

image

Conclusions

If you need a simple clone feature without code, this will do the job. What’s more it brings the power of the workflow Create step to bear allowing us to do some simple manipulation before copying.

Very easy to implement, very easy to maintain, and much cheaper than a developer.

8 thoughts on “Using Workflows For Cloning Records

  1. Abhirup

    For some reason the text ‘ – copy’ appended to the topic is not showing up in the cloned record. I tried multiple times. Can you please point out if I am missing anything?

    Like

    • leontribe

      It means the Workflow is being triggered 12 times. See what the triggers are for the workflow, and whether there is an infinite loop happening.

      Like

  2. Scott Colbourne

    Great article. Thanks.
    Do you know if I can set this workflow to clone a set number of opportunities?
    For example if I have a field where I state the number required. Then it uses this in the workflow?

    Like

    • leontribe

      These days I’d probably look to do it with Power Automate which has in-built looping structures. To do it in Workflows, you’d need the workflow to call itself, thereby making a loop, and increment a test value sitting in a field.

      Like

Leave a comment