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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

0x80040216 An unexpected error occurred Platform while sending mail through custom workflow activity in CRM 4

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee

Hi,

We were getting the below error

<error>

  <code>0x80040216</code>

  <description>An unexpected error occurred.</description>

  <type>Platform</type>

</error>

on our custom workflow activity for the following requests

SendEmailRequest

SendEmailFromTemplateRequest

This is how we were creating the CrmService instance

workflowContext.CreateCrmService(true);

however later we changed it to

workflowContext.CreateCrmService();

and the error got resolved.

 

CreateCrmService(bool asAdminUser):

Both of these methods return an ICrmService interface. This is optimal way to interact with CRM to execute the various requests in the CRM web service. The overload allows you to execute with more privileges if needed; just in case the current user doesn’t have the required privileges to perform some action in your custom business logic.

More on IWorkflowContext interface

http://blogs.msdn.com/crm/archive/2009/06/24/microsoft-dynamics-crm-4-0-iworkflowcontext-interface.aspx

bye.


Posted in CRM, Microsoft Dynamics CRM Tagged: CRM 4.0

This was originally posted here.

Comments

*This post is locked for comments