11

We are unable to use global email templates for activity entities like 'Appointment', 'phone call', 'fax', 'letter' . Even though we are able to successfully create and activate a workflow using the global template it is throwing an error when the process runs.

Steps to see the problem
1. Go to Settings->Templates->Email Templates
2. Create a new Email Template and select 'Global' as Template Type
3. Go to Settings->Processes
4. Create a workflow for any activity entity say 'Appointment' on 'Record create'
5. In the workflow, add 'Send Email' as a step.
6. Select Send email 'Use Template'
7. Click 'Set properties' and select the Global Template created in the step 2.
8. Save and Activate the workflow.
9. Now create a new appointment
10. Verify the workflow process sessions and you will see the below error
Plugin Trace:

[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SendEmailFromTemplate]
[SendEmailStep1]



Error Message:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: can't instantiate templateDetail:

-2147220989

can't instantiate template
2015-03-31T06:30:15.8653984Z

-2147220989

can't instantiate template
2015-03-31T06:30:15.8653984Z

-2147220970

System.ArgumentException: can't instantiate template
2015-03-31T06:30:15.8653984Z





[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.SendEmailFromTemplate]
[SendEmailStep1]


at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)
at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
at Microsoft.Crm.Workflow.Services.SendEmailFromTemplateActivityService.<>c__DisplayClass1.b__0(IOrganizationService sdkService)
at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
at Microsoft.Crm.Workflow.Services.SendEmailFromTemplateActivityService.SendEmailFromTemplateInternal(Entity emailEntity, Guid regardingId, String regardingType, Guid templateId)
at Microsoft.Crm.Workflow.Services.SendEmailFromTemplateActivityService.ExecuteInternal(ActivityContext executionContext, SendEmailFromTemplate sendEmailFromTemplate)
at Microsoft.Crm.Workflow.Services.SendEmailFromTemplateActivityService.Execute(ActivityContext executionContext, SendEmailFromTemplate sendEmailFromTemplate)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)




STATUS DETAILS
Declined
Ideas Administrator

Thank you for your feedback. We are declining/closing this idea as it has been open for more than 2 years and has not received sufficient numbers of votes. If the idea is still valid, request you to re-submit the idea.

Comments

R

I experienced the same issue on CRM 2016 Update 1, Email workflow. The workaround that worked for me is to set the second workflow step drop down to the entity reference that you are interested in, e.g. the 'Owning User', rather than the workflow entity itself. On the 'Set Properties' page, I also reference the 'Owning User (User)' value.  

Category: Unified Experience: Search, navigation and performance