Click here to Skip to main content
15,911,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm developing a SharePoint-hosted App with a workflow working with a List that contains a UserMulti Field. I'm currently trying to retrieve this field value to a variable with a GetDynamicValueProperties but this isn't working, the workflow execution is hanging.

My workflow configuration is OK since I can retrieve the Title to a string variable for example but when I try to get the USerMulti Field (called 'Members') to a Object variable, nothing happen.

After setting up my environment to catch the HTTP traffic I was able to find something in the XML conversation :
XML
<WorkflowStatusDetails>RequestorId: d05baf50-adbc-6aa7-0000-000000000000. Details: RequestorId: d05baf50-adbc-6aa7-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidOperationException: Looking up a value using a key is not supported on an instance of 'Microsoft.Activities.Dynamic.DynamicJsonPrimitive'.
   at Microsoft.Activities.Dynamic.DynamicItem.TryGetValue(String key, DynamicItem& value)
   at Microsoft.Activities.Dynamic.DynamicValueBuilder.PathSegmentFactory.ObjectPathSegment.Get(DynamicItem obj)
   at Microsoft.Activities.Dynamic.DynamicValueBuilder.PathSegmentFactory.ObjectPathSegment.Get(DynamicItem obj)
   at Microsoft.Activities.Dynamic.DynamicValueBuilder.PathSegmentFactory.ArrayPathSegment.Get(DynamicItem obj)
   at Microsoft.Activities.Dynamic.DynamicValueBuilder.PathSegmentFactory.ObjectPathSegment.Get(DynamicItem obj)
   at Microsoft.Activities.Dynamic.DynamicValueBuilder.PathSegmentFactory.ObjectPathSegment.Get(DynamicItem obj)
   at Microsoft.Activities.GetODataProperties.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)</WorkflowStatusDetails>

Can somebody enlighten me on that error or how to properly use a UserMulti Field in a Workflow ?

Thanks and regards.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900