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 :
Microsoft Dynamics CRM (Archived)

Unexpected Error 0x80040216

(0) ShareShare
ReportReport
Posted on by 785

 Hi all,

 I'm very new to C#, .NET and the CRM SDK but out of necessity I've been writing a 1-off program in C# to take in a JSON string and create a ticket (incident), account, contact, quote and some custom entities for me. I've hacked my way through most of the major bugs but I'm at a point now where I cannot procede.

 When I debug, I get a  soap exception saying: <code>0x80040216</code><description>An unexpected error occurred.</description>

 This happens when creating  the incident when executing a create request with the CRM service.

 I'm using VS2008. Can anyone shed any light on how I would be able to get more detail from this exception? It couldn't possibly be any more vague and has prevented me from progressing in my debugging. Thanks much for any help you guys can provide!

*This post is locked for comments

I have the same question (0)
  • Grzegorz Kalek Profile Picture
    4,210 on at
    Hi, catch SoapException and check Detail.InnerText value to get more details.
  • Michael Xavier Profile Picture
    785 on at

     Hi. Wish it were that easy. There's no detail in the inner text, here's all it says:

     0x80040216
    An unexpected error occurred.
    Platform

     InnerXml has the same thing, just wrapped in tags. So frustrating. Any other ideas?

  • Grzegorz Kalek Profile Picture
    4,210 on at
    http://technet.microsoft.com/en-us/library/bb928443.aspx
  • Michael Xavier Profile Picture
    785 on at

    Hi. Wish it were that easy. There's no detail in the inner text, here's all it says:

     0x80040216
    An unexpected error occurred.
    Platform

     InnerXml has the same thing, just wrapped in tags. So frustrating. Any other ideas?

  • Michael Xavier Profile Picture
    785 on at
    Sorry for the double post, my internet connection was a little shoddy yesterday. Can you guys think of any way for me to get more detail on this error? You all are my last hope on this.
  • Grzegorz Kalek Profile Picture
    4,210 on at
    Send the code where you are getting this error.
  • Suggested answer
    Koen Profile Picture
    5 on at

    This is an old thread, but for anyone stumbling on this in search of an answer herer are my two instances where I got the same error (without additional information in the innertext of the detail of the exception).

    First was trying to update the address of an account using the method with dynamic entitities. In passing the entitiy I only passed the primary key of the account, while you also need to pass the primary key of the address that is also in the account record. So now for dynamic updates I first collect all keys on the record and then update (found this with an example where they preceded the udpate with a full retreive of the record)

    Second instance that I got no detail was in adding a record with a foreign key and I used the KeyProperty instead of the LookupProperty to specify the foreign key.

    So in general I think the answer is : you did something wrong and dynamics hasn't foreseen a specific error message for this; Hopefully your error is similar to the above and this post helps you, otherwise you'll have to dig in and find out what you're not doing according to the book

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans