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.

Advertisements

3 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

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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