dear all
i do have a workflow that sends email to the new owner whenever a case is reasigned, it was working fine, now it is not working.
please check below.
Plugin Trace:
[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SendEmail]
[SendEmailStep1: send email]
Error Message:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Invalid Party Object Type 9Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>c2a77d06-6a1e-494b-aff5-0dfb1419b828</ActivityId>
<ErrorCode>-2147207930</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>ApiExceptionSourceKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.Common.ObjectModel.EmailService</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiOriginalExceptionKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: Invalid Party Object Type 9 ---> Microsoft.Crm.CrmException: Invalid Party Object Type 9
at Microsoft.Crm.Common.ObjectModel.ActivityPartyService.Create(IBusinessEntity entity, ExecutionContext context)
at Microsoft.Crm.ObjectModel.CommunicationActivityServiceBase.CreateCommunicationPartiesInternal(BusinessEntityMoniker moniker, CommunicationActivity activity, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.PostCreateInPipelineEventHandler.Invoke(Object sender, ExtensionEventArgs e)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoCreate(IBusinessEntity entity, ExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass2_1.<Execute>b__0()</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepKey</d2p1:key>
<d2p1:value xmlns:d4p1="schemas.microsoft.com/.../Serialization" i:type="d4p1:guid">8c3b8615-ecd8-db11-b397-0019b9204da9</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiDepthKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:int">5</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiActivityIdKey</d2p1:key>
<d2p1:value xmlns:d4p1="schemas.microsoft.com/.../Serialization" i:type="d4p1:guid">c2a77d06-6a1e-494b-aff5-0dfb1419b828</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d2p1:key>ApiStepSolutionNameKey</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Invalid Party Object Type 9</Message>
<Timestamp>2018-11-06T11:14:24.3114443Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>c2a77d06-6a1e-494b-aff5-0dfb1419b828</ActivityId>
<ErrorCode>-2147207930</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d3p1:key>ApiExceptionSourceKey</d3p1:key>
<d3p1:value xmlns:d5p1="www.w3.org/.../XMLSchema" i:type="d5p1:string">Plugin/Microsoft.Crm.Common.ObjectModel.EmailService</d3p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d3p1:key>ApiOriginalExceptionKey</d3p1:key>
<d3p1:value xmlns:d5p1="www.w3.org/.../XMLSchema" i:type="d5p1:string">Microsoft.Crm.CrmException: Invalid Party Object Type 9 ---> Microsoft.Crm.CrmException: Invalid Party Object Type 9
at Microsoft.Crm.Common.ObjectModel.ActivityPartyService.Create(IBusinessEntity entity, ExecutionContext context)
at Microsoft.Crm.ObjectModel.CommunicationActivityServiceBase.CreateCommunicationPartiesInternal(BusinessEntityMoniker moniker, CommunicationActivity activity, ExecutionContext context)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.PostCreateInPipelineEventHandler.Invoke(Object sender, ExtensionEventArgs e)
at Microsoft.Crm.BusinessEntities.BusinessProcessObject.DoCreate(IBusinessEntity entity, ExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass2_1.<Execute>b__0()</d3p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d3p1:key>ApiStepKey</d3p1:key>
<d3p1:value xmlns:d5p1="schemas.microsoft.com/.../Serialization" i:type="d5p1:guid">8c3b8615-ecd8-db11-b397-0019b9204da9</d3p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d3p1:key>ApiDepthKey</d3p1:key>
<d3p1:value xmlns:d5p1="www.w3.org/.../XMLSchema" i:type="d5p1:int">5</d3p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d3p1:key>ApiActivityIdKey</d3p1:key>
<d3p1:value xmlns:d5p1="schemas.microsoft.com/.../Serialization" i:type="d5p1:guid">c2a77d06-6a1e-494b-aff5-0dfb1419b828</d3p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d3p1:key>ApiPluginSolutionNameKey</d3p1:key>
<d3p1:value xmlns:d5p1="www.w3.org/.../XMLSchema" i:type="d5p1:string">System</d3p1:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<d3p1:key>ApiStepSolutionNameKey</d3p1:key>
<d3p1:value xmlns:d5p1="www.w3.org/.../XMLSchema" i:type="d5p1:string">System</d3p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Invalid Party Object Type 9</Message>
<Timestamp>2018-11-06T11:14:24.3114443Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>c2a77d06-6a1e-494b-aff5-0dfb1419b828</ActivityId>
<ErrorCode>-2147207930</ErrorCode>
<ErrorDetails xmlns:d4p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Invalid Party Object Type 9</Message>
<Timestamp>2018-11-06T11:14:24.3114443Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText>[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SendEmail]
[SendEmailStep1: send email]
</TraceText>
</OrganizationServiceFault>
at Microsoft.Crm.Workflow.Services.SendEmailActivityService.Execute(ActivityContext executionContext, SendEmail sendEmail)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
your solution sounds good but i already had a shorter solution from Mr. Ravi.
thanks for your help.
Hi Ahmad,
I encountered this problem a few weeks ago at another entity, problem is (TO)=team and the solution could be to create a distribution sheet at "Active directory domain services" for the team like "cases@companyname.com" where the e-mail recipients will be team members. So you can have owner of case the Team and (TO) will be that distribution sheet.
Hope this can help you too :)
thanks Ravi
Hi Ahmad,
From the error message, you have set the "Team" in the "To" party list. As mentioned above & previously, you cannot send email to team but you can send email to queue of that team. In your email screenshot, you have used owner (Case) which could be a team as well, so instead of owner(case) you need to use owning user or queue for owning team. Just like you did it before in this thread :)
community.dynamics.com/.../298026
Hope this helps.
Hi..
You cannot sent email to team directly.instead you can use CRM workflow utilities to send email to all the users in the team..
thanks Goutam, the this is for both (team and user), that is why you will find many variables in the (TO) and one will have a valid user for certain.
but my question, do you think any of the variables in the (TO) may cause an error if the case is owned by a team or owned by a user?
my understanding is that at least one variable should have a value in order for this email to go , if all are empty then problem will occur, right?
thanks.
Hi Ahmad,
If I am not wrong the problem is the owner , can you please check with different owner.
Are you assigning the case to team or user?
i also attached the email template