[Note: originally posted on MSDN]
Hey People,
I’m just working with a basic workflow in SharePoint Designer 2013 and trying to fetch the Enterprise Keywords column from the current item. But I keep getting an error:
System.InvalidCastException: The value ‘d/results(0)/Enterprise_x0020_Keywords’ cannot be read as type ‘String’. at Microsoft.Activities.GetDynamicValueProperty`1.CheckedRead(String propertyName, DynamicItem value) at Microsoft.Activities.GetDynamicValueProperty`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager
Currently I’m trying to assign it to a dictionary variable and I’ve also tried a string, with the same results.
Anyone know how we’re supposed to handle Enterprise Keywords in workflow? Note: I don’t really want to drop into Visual Studio…
Thanks Craig
Hi,
You are using wrong field in Designer: Currently you use Enterprise_x0020_Keywords and this will failed in 2013WF I notice that Enterprise_x0020_Keywords will work in WF2010 but not in 2013 – MS bug?
In Designer you can find always two fields for metadata column and in your case you should select Enterprise_x0020_Keywords_0. The same goes for any manage metadata fields in WF2013 we should use ColumnName_0.
Or you can call HTTP service with taxonomyhiddenlist and check the term based on WSSID but this is much more twisted approach.
Hope this will help
Regards
Dawid