web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Custom AIF document service not creating record and generating a warning exception

(0) ShareShare
ReportReport
Posted on by

I have created a new document service to import data in to the JMGAbsenceCalendar table.  The query I based the document service on simply contains the JMGAbsenceCalendar table.  I have only enabled the create operation for this inbound port.  I am able to deploy the Inbound Port with no issue, and ab able to write the C# class to consume the service.  Everything looks good, but the record is not being created, and an exception of type warning is being thrown.  The response I get from the create operation contains the RecId field, which has the value of 0.  The warning being thrown is "Could not create correlation for message {F6ACA8FA-CC86-418F-9BB7-A5A1AE333EEA}".  For the life of me I cannot understand what is going on here.  The document (xml file) being processed looks just fine.  Any input would be greatly appreciated, as I have never encountered a nagging issue like this before, and am just stuck at this point.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,118 Most Valuable Professional on at

    Maybe the error is just a consequence of a bug in creating records. Maybe the services pretends that a record was created although it wasn't and the framework later tries to create correlation to an empty record ID, which makes no sense and therefore it fails.
    Have you tried to debug your service? For example, does it successfully execute JMGAbsenceCalendar.insert()?

  • Community Member Profile Picture
    on at

    You may be right.  I did debug, and the JMGAbsenceCalendat.insert() was never invoked.  My confusion comes in because whatever is causing the error is not being caught in the AIF exceptions.  When I look at the document, all of the fields seem to be correct.  I’m not even sure where I should debug at this point.

  • Verified answer
    Community Member Profile Picture
    on at

    Alright, I got it figured out now.  The issue was on the JmgAbsenceCalendar table, the field JobId is required, but also set to not allow edit and not allow edit on create.  This works on the form because the value is populated through code, and not directly on the form.  I changed the field to allow edit on create, and it works now.

    When stepping through the code, I did notice that the validate method was throwing an error, but for some reason this error was not being caught as an exception on the AIF service, which made it rather difficult to get to the bottom of this one...

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans