Pogo69's Blog

April 1, 2011

Post CRM 2011 Upgrade from CRM 4.0 – Resolve Case Error – Allotment overage is invalid

Filed under: CRM, CRM 2011 Upgrade, SQL Server, Transact SQL — pogo69 [Pat Janes] @ 07:57

We started receiving this error whenever we tried to resolve a Case (incident) after the upgrade of our internal CRM system from 4.0 to 2011.

The exact text of the error message is as follows:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Allotment overage is invalid.Detail:
<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”&gt;
<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic&#8221; />
<Message>Allotment overage is invalid.</Message>
<InnerFault i:nil=”true” />
<TraceText i:nil=”true” />

Which… meant absolutely nothing to me, and nothing to any of the other people suffering from the same issue in a recent thread on the MSDN CRM Forum.

To test my theory that it was only upgraded Contract Lines that cause the error, I created a new Contract and Contract Line and compared them with the pre-existing upgraded versions.  The offending data is the AllotmentsOverage column in the ContractDetailBase table; for all of the old Contract Lines in our DB post-conversion, the value of this field was NULL, which is obviously invalid (as per the error message we’re all receiving).

I ran a query to update all NULL values to 0 (a new Contract Line that I created for testing had this field set to 0):

update ContractDetailBase set AllotmentsOverage = ISNULL(AllotmentsOverage, 0);

After the update, all was well again!



  1. Thanks ! Just saved me a pile of time hunting this down.

    Comment by Keith — April 12, 2011 @ 01:42

  2. Brilliant stuff. I had made a template myself but I had included class library for linq queries until I found today that you can’t use them with CRM 2011 online.

    could you please publish an RSS feed to this blog, I want to subscribe but cant find it.



    Comment by Hosk — April 16, 2011 @ 00:25

    • Thanks!

      Comment by Dan Curry — April 26, 2011 @ 21:24

  3. Yes, extreamly helpfull. Thanks!

    Comment by Glenn — June 2, 2011 @ 03:55

  4. Pretty good!! Thank you very much

    Comment by David Barroco — June 9, 2011 @ 01:17

  5. Excellent solution! Thanks for sharing.

    Comment by António Ferreira — November 4, 2011 @ 01:38

  6. Thanks a lot! It helped me too!

    Comment by Irina Votske — February 10, 2012 @ 18:03

  7. Great stuff !!
    What is the good thin on CRM2011 ? I’m still looking for it …… Just new Problems !

    Comment by Steve — April 12, 2012 @ 01:46

    • Hi Steve,

      While some experience teething issues with the upgrade to CRM 2011, I whole heartedly recommend making the move. There are vast improvements in so many areas; and while the product still has plenty of room for growth, it is changing for the positive very rapidly with the new rollup schedule.

      Dependent upon the scope, impact and quantity of unsupported customisations in a CRM 4.0 deployment, the migration can require a significant effort to achieve, but it worth the effort to at the very least begin planning for it. At least then one knows the cost in terms of man hours so that the business can make informed decisions as to the timing and importance of the migration, with respect to enhancements and bug fixes to the existing system.

      In any case, I always recommend a “trial” migration. Import the CRM 4.0 Organisation into a freshly installed CRM 2011 deployment and see what breaks. This will provide a good “feel” for the migration requirements prior to an in-depth code review.

      Comment by pogo69 — April 12, 2012 @ 05:00

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: