Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Unexpected Error 0x80040216

Posted on by 135

I have a custom ASPX page with code that creates a custom entity from an Incident entity.  This code is invoked by clicking a button on the Incident entity (ISV.config).  The custom entity (Issue) has one required field.  I populate this field with data from a field/property in the Incident entity (both are text data type).

'Create Issue entity
Dim entityIssue As DynamicEntity = New DynamicEntity
entityIssue.Name = "Issue"

'Create the create target; set the properties of the target
Dim createTarget As New TargetCreateDynamic()
createTarget.Entity = entityIssue

'create the request object; set the properties of the request;
Dim createRequest As New CreateRequest()
createRequest.Target = createTarget
entityIssue.Properties = New PropertyCollection()

'set the required field
entityIssue.Properties.Add(New StringProperty("Title", "This is the title"))

'execute the create request
Dim createResponse As CreateResponse = DirectCast(crmSrvc.Execute(createRequest), CreateResponse)

The SOAP log file contains the following:

-----Request at 9/17/2009 11:56:18 AM
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<CrmAuthenticationToken xmlns="http://schemas.microsoft.com/crm/2007/WebServices">
<AuthenticationType xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">0</AuthenticationType>
<OrganizationName xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">DistributedSolutionsInc</OrganizationName>
<CallerId xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">00000000-0000-0000-0000-000000000000</CallerId>
</CrmAuthenticationToken>
</soap:Header>
<soap:Body>
<Execute xmlns="http://schemas.microsoft.com/crm/2007/WebServices">
<Request xsi:type="CreateRequest">
<Target xsi:type="TargetCreateDynamic">
<Entity Name="Issue">
<Properties xmlns="http://schemas.microsoft.com/crm/2006/WebServices">
<Property xsi:type="StringProperty" Name="Title">
<Value>This is the title</Value>
</Property>
</Properties>
</Entity>
</Target>
</Request>
</Execute>
</soap:Body>
</soap:Envelope>
----- Response at 9/17/2009 11:56:18 AM
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Server was unable to process request.</faultstring>
<detail>
<error>
  <code>0x80040216</code>
  <description>An unexpected error occurred.</description>
  <type>Platform</type>

</error>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>

The trace log file gives me this:

 [2009-09-17 11:56:18.8] Process: w3wp |Organization:15fa1307-0375-4d79-ad22-b2088bd2c9b4 |Thread:    9 |Category: Platform.Sdk |User: 97ca5310-3ab7-dd11-b987-000d566f56c2 |Level: Error | CompositeSoapExtensionExceptionHandler.Handle
>CrmSoapExtension detected non-CrmException - report will be sent to Watson:
   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

The Inner text of the SOAP exception error message gives me this:

0x80040216 An unexpected error occurred. Platform

How do I figure out what is causing this error? Any help will be greatly appreciated.

Thanks,

Aravind Hande

*This post is locked for comments

  • Grzegorz Kalek Profile Picture
    Grzegorz Kalek 4,210 on at
    Re: Unexpected Error 0x80040216
    Try Dim createResponse As CreateResponse = DirectCast(crmSrvc.Execute(createRequest), CreateResponse) Catch so As Web.Services.Protocols.SoapException Dim err As String = so.Detail.InnerXml 'InnerText Catch ex As Exception End Try

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans