I've got multiple workflows that are configured to send an email to people in a Person or Group field that allows multiple selections. When each workflow gets to this step it is suspended with the below error. It seems to be throwing the error even if just one person is selected. For now I'm going to see if I can work around that by using different fields.
By the way, there seems to be an issue with submitting support cases for o365 tenants. The License Key is not a required field, though if I leave it blank I get an error that the License Key field is invalid. If I enter my Tenant ID in the license key field it also says the License Key is invalid. I tried using IE and Firefox, but could not submit the form either way.
An unhandled exception occurred during the execution of the workflow instance. Exception details: System.InvalidCastException: The value 'd/results(0)/BDS_x002f_CSMId' 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) Exception from activity GetDynamicValueProperty<String> Sequence DynamicActivity<String> DynamicActivity<String> BuildCollection<String> DynamicActivity<Collection<String>>
Solved! Go to Solution.
This happens, because that field does not return you a single "Peeople or Group" item, but a Collection. I faced it as well.
To workaround it follow these steps:
With such string you can then assign a task, send an email or split it and then use in "foreach" loop.
Hello, old thread, but I am hoping there is a better way to do this action now. I could do what is explained above, but I do not want to send a separate email to each person in the group. This solution also has to work for 1 to x number of people in the SharePoint Multi Person field.
My thought is to assign the field to a collection variable in the workflow, loop through collection and write email address to a new variable to contain a string of email1;email2;email3...
Will this work, is there an easier way or am I stuck with the individual emails?