web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Voice of the customer send e-mail workflow error

(0) ShareShare
ReportReport
Posted on by 40

Hello,

I published a case follow-up survey and used the snippet in a workflow which sends e-mails to case contacts asking to complete the survey. The workflow is triggered at case completion but when I complete a case process, I get the below error.

It basically says that I need a `To` field but in the workflow it's been populated by case contact.

Has anyone come across this kind of problem before?

Regards

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: To generate a survey unique code, send an individual email to each participant. Microsoft.Xrm.Sdk.InvalidPluginExecutionException: The "To" field is required to have any of these (contact/account/lead/systemuser) type of participant send an invitation.!
at Microsoft.Crm.Surveys.Plugins.InvitationPlugin.CreateInvitationAddressees(Entity invitation, EntityCollection to, String invitationToMultipleRecipientsMessage, VocPluginContext vocPluginContext) (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>43cc7238-307f-42bb-9aa1-e0cab1f395ee</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: To generate a survey unique code, send an individual email to each participant. Microsoft.Xrm.Sdk.InvalidPluginExecutionException: The "To" field is required to have any of these (contact/account/lead/systemuser) type of participant send an invitation.!
at Microsoft.Crm.Surveys.Plugins.InvitationPlugin.CreateInvitationAddressees(Entity invitation, EntityCollection to, String invitationToMultipleRecipientsMessage, VocPluginContext vocPluginContext) (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).</Message>
<Timestamp>2017-05-24T00:02:19.3030088Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin]
[bb48066e-f22f-412f-a530-91f72e4b859b: GlobalActiveStagePlugin]

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.WorkflowEventPlugin]
[3844d008-ef45-413a-a8b0-549bb10046b9: WorkflowEventPlugin]


[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
[46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]
Starting sync workflow 'Post-case-survey', Id: ef4fe332-1440-e711-810e-c4346bc58654
Entering SendEmailStep1_step:
Sync workflow 'Post-case-survey' terminated with error 'System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: To generate a survey unique code, send an individual email to each participant. Microsoft.Xrm.Sdk.InvalidPluginExecutionException: The "To" field is required to have any of these (contact/account/lead/systemuser) type of participant send an invitation.!
at Microsoft.Crm.Surveys.Plugins.InvitationPlugin.CreateInvitationAddressees(Entity invitation, EntityCollection to, String invitationToMultipleRecipientsMessage, VocPluginContext vocPluginContext) (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).'

</TraceText>
</OrganizationServiceFault>

7827.workflow.png

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Cemal Tevrizci Profile Picture
    40 on at

    I solved it right now, To field should be populated with Case-customer and not case-contact

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Shidin Haridas Profile Picture

Shidin Haridas 2

#2
Abdullah13 Profile Picture

Abdullah13 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans