CRM 2013: Email Router: The message exceeds maximum supported size

If your email router does not process any emails but your inbox from Email Provider works just fine!?! Check event logs where Email Router is installed. You might see many repeated errors similar to mentioned error here below:

#27938 – An error occurred while checking for email messages to process in mailbox Microsoft.Crm.Tools.Email.Providers.EmailException: Error: The message exceeds the maximum supported size.
at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.LogEwsResponseErrorWarning(String message, ResponseClassType responseClassType)
at Microsoft.Crm.Tools.Email.Providers.ExchangeWSConnector.RetrieveMessage(ArrayList ids, Int32 index, ServiceLogger serviceLogger)
at Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider.RetrieveNextMessageInternal()
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.RetrieveNextMessage()
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()

Check your inbox for the emails with attachments. Find emails with more than expected attachments size per email, take backup (if required) and delete them. Your Email Router should work just fine once this is done!

In my case an email with 100+ MB attachment size was creating an issue.

Happy Troubleshooting!!


CRM 2011: Set Due Date to today and Due Time to 08:00 AM by default

Hello everyone…

Recently I was asked a question:
Can we load current date and time (8 AM default) to Due field in activities in Microsoft Dynamics CRM 2011?
I got the solution… yeah!!

For this you need to edit the activity (Task/Phone Call/Fax/Email/etc.) entity and put a JavaScript in OnLoad event of the entity form.

My First try was to access both date and time through HTML DOM with very easy JavaScript code…

document.getElementById("dateInput").value = currentDate;
document.getElementById("timeInput").value = "08:00";

But, it created a problem; when the date field was edited by the user, the time would change to 00:00 by default. I searched many blogs and finally found an attribute called scheduledend which can be accessed through Xrm.Page object and getAttribute() method. Just need to set a JavaScript date and you have the values desired in Due Date and Time fields.

Here is the script I wrote to populate date and time:

var d = new Date();
var date = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 8, 0, 0, 0);

Here is the result when a new activity is created:

Rikin Shah.