Reputation: 43
I'm trying to implement some Workflows on SharePoint 2013 using Visual Studio 2012 for learning purposes. The workflow I'm working on now is very simple, it supposed to copy one list item to another list, but I'm getting an exception when obtaining the other ListId.
So here is how it goes,
Finally, I use the CopyItem Activity, this activity needs three parameters: ListId, ItemGuid and ToListId. Since I haven't found any activity that gets a ListId, I selected the list I want on the ToListId combobox and it writes this on the expression editor:
System.Guid.Parse("{$ListId:List2;}")
Very simple, right? But when I run the workflow I get this exception:
Dispatcher encountered an unexpected exception: System.Runtime.CallbackException: The call to OnRequestAbort on the WorkflowInstance 'b1eb965e-d6e4-47d3-9170-ae2677897947' threw an exception. This is considered fatal. See inner exception for details. ---> System.AggregateException: Should be processing if notifying about persistable idle. ---> System.AggregateException: One or more errors occurred. ---> System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
I have no idea why is it throwing that exception and I haven't found any other way to obtain the GUID of a list that is not the CurrentList of the workflow context.
A little help please....
Upvotes: 1
Views: 1908
Reputation: 11
From: Shawn Baerwald (http://answers.flyppdevportal.com/categories/azure/workflow.aspx?ID=d9b2e284-13e2-431b-8299-b3b4510942ce)
Fix/HACK involves selecting one of the lists, clicking the elipse (...) and in the resulting edit box replace:
System.Guid.Parse("{$ListId:Lists/Tasks;}")
With the list GUID:
System.Guid.Parse("{4CGG7172-6EB0-4414-82E6-92BBE8A5E64A}")
Upvotes: 1