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

Cannot create a record in Job runs (DMFExecution). The record already exists.

(0) ShareShare
ReportReport
Posted on by 25

Hi,

I have a DMF processing group that runs as a batch job that runs daily looking for the existence of new files in a folder and create GL transactions. The batch could run for weeks without any issues until the error appears. It seems like DMF assigns the same Job Id again and again causing a duplicated index issue. After debugging the issue I got into the method and class that the system uses to create the Job Id. For some reason the DateTimeUtil::getSystemDateTime() method is getting the same date-time again and again. When AOS service is restarted, the batch job starts working again, and as I mentioned before it could work for weeks without issues.

Do you know of any issues with that method?

Why an AOS service restart temporarily fix the issue?

This is the error message. The system will try to insert the same job id every time it runs.

pastedimage1611255095843v2.png

This is the part of the code that the job id is created.

pastedimage1611254647286v1.png

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    304,549 Super User 2026 Season 1 on at

    Hi Martin,

    You have a configuration of execution ID, date/time and a file sequence number. When the date/time will be the same (not sure why), the file sequence number will be the only part that makes the execution ID unique.

    The Execution ID has a limited length. It might be the case that it can truncate the string when a new file number added to the string will exceed the maximum length of the Execution ID field.

    Instead of the method DateTimeUti::getSystemDateTime(), you can try to use 'DateTimeUtil::utcNow()'

  • NitramE Profile Picture
    30 on at

    Hi André,

    Thanks for your quick response.

    Is this execution id configurable?

    Where in AX it can be changed?

  • André Arnaud de Calavon Profile Picture
    304,549 Super User 2026 Season 1 on at

    Hi Nitram,

    It would be possible to extend the length of the Execution ID field. You can also create a processing group with a shorter name, so there will be more characters left for the numbering.

    Have you tried to change the coding to retrieve the date/time stamp?

  • Andre Kruijer Profile Picture
    5 on at

    Hi Martin,

    I was wondering if you could resolve the issue. I have exactly the same problem. In my case I run a DIXF job every 15 min. and it went fine for months, but I get the same problem as you have. The strange thing is that it I get an error message about records that exist with an ExecutionID of a number of days ago and sometimes it end the job successfully.

    pastedimage1617698977215v2.png

    Any new info on this topic?

    Thank you.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 356

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans