SharePoint 2010 Workflow Create List Item Fails after Moving to New Site

Situation:

You create a great workflow that auto-creates items in other lists/libraries.  Then you realize you need to move this workflow because you are moving the site to a new location or you have created this workflow in a test/dev environment and need to place it in production.

Problem:

When you move a workflow, the reference to the other library/list that the workflow creates items in will break because in essence it is referring to the List GUID and this GUID does not exist in your new location.

Here is a picture showing some of the actions (my workflow creates 20+ items based on checkboxes in a list item).

As you see I have corrected the first 2 actions and left the second 2 with the old incorrect GUIDs.  After you move the workflow it will shows these GUIDs because these GUIDs refer to the list or library on the site you moved this workflow from and now it cannot bring in the proper name of the list from the location you moved it to.

If you try to edit this action and select the new list like this, by selecting the GUID link:



It will wipe out all of the fields and settings you brought in:


This may not be a big deal if you are only copying a few fields and you only create several items in your workflow, but as you can see from my example, I would have to recreate approximately 300 clickable actions.  I have moved this workflow several times so this has been a large loss of work and I am now afraid to move it again, until now...

The FIX:

  1. Select the action.  In this case just ensure the Create item in... action is selected but we are not opening the properties in it yet.
  2. Select the Advanced Properties button in the ribbon.
  3. A window pops up.  This will show you the Parameters for this action.  You will see the GUID displayed in the ListId field.
  4. Select the GUID and a drop down menu appears allowing you to select the name of the local list/library you intend to use.  This will now wipe out any of the field lookups you are doing within the action.  So you are now done.  Pretty easy actually.  Repeat for each action you have that creates a new item.

Comments

Popular posts from this blog

SharePoint Designer 2013 Approval Workflow with Comments

Change SharePoint server hostname and Web Application Names

SharePoint Search - Content Processing Pipeline Failed to Process the Item