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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Enqueue API import error

(0) ShareShare
ReportReport
Posted on by 5

Hello,

I had a business requirement where I had to create packing structures against purchase orders at time of packing of containers. I have achieved the entire solution except that there is one major issue. For the automation I have used the Enqueue API to import XML based files into Dynamics Inbound ASN V3 entity.

There is a recurring data job that has its recurrence set to 1 minute that communicates with the enqueue API to import that file. The issue arrives when I try to enqueue multiple files at once. Like say I have enqueued 4 files with a gap of about 30 to 50 seconds. Once the import starts via the integration, randomly out of nowhere either the second or the third or the fourth file enqueued to the API fails to import into Dynamics. Upon my investigation what happens is that when the first file comes in to the entity it inserts fine but since the record has been updated/changed in terms of dynamics the next file coming in might throw an error stating

"Cannot edit a record in Purchase Order Additional Fields (WHSPurchLine).
An update conflict occurred due to another user process deleting the record or changing one or more fields in the record."

Here's a screenshot showing the Inbound ASN V3_WHSInboundLoadPackingStructureLineV3Entity logs:

7317.pastedimage1677421520427v1.png

I tried the import with setting the recurrence to 3 minutes but what it did was out of the 5 files i tried importing, Dynamics threw an error on the 2nd, 3rd and 4th files and successfully imported the 1st and 5th files.

Can someone kindly shed some light onto this on how can I achieve this solution?

I have the same question (0)
  • Suggested answer
    huijij Profile Picture
    19,811 on at

    Hi Taha,

    When you set up a data project and recurring data jobs, you can Create a data project > Create a recurring data job > Authorization for the Recurring Integration API > Queue the recurring Import Job. you said u have enqueued 4 files with a gap of about 30 to 50 seconds. I think you could add a response value and only do the second file if the first one succeeds and returns, which would avoid a lot of errors. 

  • Taha Siddiqi Profile Picture
    5 on at

    Hi Judy,

    Thank you very much for your response.

    The thing is that the enqueue API queues up the file one by one as the end user is performing the steps of the process. The enqueue API would only return a response Id and the data recurring job once runs it picks up every file that exists in the queue and starts to process them all at once. I traced the error down at the code level and it is raised at WHSPurchLine update method on the call to Super with the following error message:

    Microsoft.Dynamics.Ax.Xpp.UpdateConflictException: 'Cannot edit a record in Purchase Order Additional Fields (WHSPurchLine).

    An update conflict occurred due to another user process deleting the record or changing one or more fields in the record.'

    I'm thinking of a way to either make the enqueue API only pick one file at a time, process it and then pick the next file. But I'm not sure how I could achieve this.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 517 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 440

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans