Broken list references in SharePoint Designer 2010 reusable workflow when deployed

Has this ever happened to you that a list is already on your live system and you are asked to create a workflow for that? I know it happens quite often. In this case list workflow is not an option, unless you are creating it directly on live server, very unlikely, but still I have seen this happening.

If you don’t have to go for Visual Studio based workflow, then reusable workflow in Designer is the only option. Usually the course of action is as follows;

  • Get the list template from live server, for which you want to create the workflow, if you don’t already have the updated list on development
  • Create the a list with the same name as on live server based on the template on the development server
  • Create a reusable workflow and reference the list all over it
  • Test the workflow, it works
  • Be happy J
  • Save the workflow as a template solution
  • Upload that solution on live system, and activate the related workflow feature in the web site
  • Open the workflow designer, feel happy that your workflow is there
  • Open the workflow for edit

And to you surprise all the references to the list are broken

You go back on live system, check the list name, you match it with the list name you have on development server and they are exactly same

Then why my references are broken, one of the biggest possibilities is because the list on production server was renamed after it was created, and workflow references lists by their path i.e

{$ListId:Lists/YourCustomList;}

It’s because the URL of the list always remains as it was first created, even if you change its title.

But it’s too late to know this at least for this workflow, but might save a lot of time on next ones.

There is another possibility that you renamed the list name on the development machine for any reason after its creation, and then original names of both of the list don’t match.

Create the list on development which matches the original name when it was first created on the live one, and it will be fine when deployed. You can find the original name in the list URL.

Remember renamed columns, lists or libraries are always painful for developers, if possible delete and recreate these items instead of changing their names.

Advertisements
  1. Leave a comment

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

%d bloggers like this: