Tuesday, February 9, 2010

The length of the 'messageid' attribute of the 'email' entity exceeded the maximum allowed length of '100'

I was receiving this error often at the Event Viewer > Application Log of the CRM Server.

#9628 – An error occurred while delivering the e-mail message with subject "This is a second demo" in mailbox crmdemo@gmail.com for delivery to http://192.168.1.205:5555/crmdemo.System.Web.Services.Protocols.SoapException: Server was unable to process request.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.Crm.Sdk.Proxy.CrmService.Execute(Request Request)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.DeliverMessageInternal(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.Pop3PollingMailboxProvider.DeliverMessageInternal(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.DeliverMessage(EmailMessage emailMessage)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()\r\n
0x80044331
A validation error occurred. The length of the 'messageid' attribute of the 'email' entity exceeded the maximum allowed length of '100'.

Resolution:
Tweak the Message ID attributes Maximum Length from 100 - 200 or 250 and you are good to go.
Procedure:
  1. Settings > Customizations > Customize Entities > Email > Attributes
  2. Double click Message ID and change the Maximum Length
  3. Save and Close
  4. Publish

E-mail Sending Failed - Dynamics CRM 4.0 E-mail Router

Recently I had a chance to date with the E-mail Router for Microsoft Dynamics CRM 4.0. I did not have an Exchange Server setup so I tried with the POP3 e-mail settings. Though it was straight forward and easy to configure the E-mail Router, I had some trouble sending an e-mail from CRM.

By the way, I am using Google Mail (Gmail) POP3 service to configure my environment.

I received the below error
#61042 - An error occurred while processing the outgoing e-mail
message with subject "xyz" for SMTP: http://localhost:5555/organizationName for
delivery through smtp.gmail.com. System.Net.Mail.SmtpException: The operation
has timed out.
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at
Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider.ProcessMessageInternal(email
emailMessage)
at
Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.ProcessMessage(email
emailMessage)
at
Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()


After trying things like re-configure E-mail Router, Gmail POP3 settings, E-mail Router service restart etc. something dawn'd on me.

I noticed that Gmail had provided with 2 port numbers, SSL (Secure Sockets Layer) and it's successor TLS (Transport Layer Security). I replaced the SSL port number with the TLS (ie 465 with 587) in the E-mail Router Outgoing Configuration Settings under the Advanced tab.

Result: The E-mail moved on and so did I. Happy e-mailing!!

Tuesday, January 26, 2010

Both 'amount' and 'percentage' cannot be set

There was a bit of learning involved last week when I was trying to update the Contract Line entity programmatically. I had a custom entity under the Contract Line entity. I had written web service code which inturn called the CRM Service to update the Contract Line entity with values from the custom child entity.

In my custom web service I was summing up the values from the child records and updating the 'Amount' and 'Discount Percentage' fields of the related Contract Line record.

While I was testing, the system generated the platform trace which said -

Both 'amount' and 'percentage' cannot be set.

I am assuming, CRM wanted to convey that both 'Amount' and 'Discount Percentage' fields of Contract Line entity cannot be calculated and updated using the CRM Service Update method.

I really don't know why was the system designed this way? All I do know is that I have to look for another way out.

I would appreciate if someone can reason this behavior!!

Monday, January 18, 2010

The SELECT permission was denied on the object 'Build Version', database ', schema 'dbo'.

  • So you were trying to Restore CRM database on another machine?
  • You used the Deployment Manager to Import Organization?
  • You tried to load CRM using the browser but received something you didn't want to see
The SELECT permission was denied on the object 'Build Version', database ', schema 'dbo'.

No wonder you reached this blog post. Read on. This might help:

  • Open SQL Server Management Studio
  • Select the CRM Database you are working with
  • Right-click the BuildVersion table from the CRM Database and click Properties
  • Select Permissions tab on the left pane
  • Click on View Schema Permission on the right pane
  • Click on Add button
  • Click Browse
  • Select CRMReaderRole of type Database Role
  • Click OK twice (Back to Table Properties Window)
  • Check the intersection Select vs. Grant
  • Click OK

You should be good to go.

Friday, November 20, 2009

'Append' & 'Append To' The Way I See It

I'll explain you this through an example.

Let's take Accounts and Opportunities where "Accounts" is the parent and "Opportunities" is the child (i.e. There are multiple Opportunities per Account.)

Now the User can relate an Opportunity to an Account either through the Potential Customer field on the Opportunity, or through the Opportunities item at the navigation bar of an Account. In this case the User needs to have "Append permissions on Opportunities and Append To permissions on Accounts."

In the present continuous tense "You are Appending the Opportunity, and Appending To the Account."