我已经建立了一个工作流,该工作流将向允许多个值的People Picker字段中的一个或多个人发送电子邮件。但是,工作流无法正常工作并显示此错误:
RequestorId: 64fb8be0-4f83-3135-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidCastException: The value 'd/results(0)/residentsId' 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 bookmarkManager, Location resultLocation)
通过一些研究,我发现这与如何为允许多个用户的“ People Picker”字段格式化电子邮件地址有关。我实现了将“返回”字段更改为“显示名”(以分号分隔)和“登录名”(以分号分隔)的修复程序,但是它们都不起作用。以下图片是我的工作流程和列表设置。
https://i.stack.imgur.com/nqNE1.png
https://i.stack.imgur.com/YuwyT.png