Friday, July 19, 2019

The email must have at least one recipient before it can be sent.



This is the most common exception in Dynamic CRM when sending an email using a workflow. There could be multiple reason for this exception to occur. 

In this blog post I will be discussing how to troubleshoot and identify possible cause for such an exception.

It is only about Recipient (To, CC or BCC)

We have nothing to do with From section of an email, otherwise you will get different error when sending an email. We only need to focus on recipient of an email.

'To' is mandatory among all Recipient.



In workflow designer you might skip To and set only CC or BCC alone or set both CC and BCC, but in run-time you will get an exception.


Recipient entity without an email address


It is always better to check if email field is populated or not in a workflow before we  try to sent an email to either Contact, Account, Lead etc. 

If your business requires sending an email to such entities why not make email as mandatory field.


In above workflow we are verifying if respective entity (Contact in this context) has Email field populated, otherwise we are notifying CRM Admin or Business Owner about missing email address.

Contact Preference set to - Do Not Allow.


Even if Contact, Lead or Account have a valid email address populated in its email field, CRM workflow engine will not consider this as valid recipient if its contact preference is set to Do Not Allow

So it is a good practise that we should always verify such conditions in our workflow steps before we send out an email.



Hope it Helps
Vipin Jaiswal

No comments: