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 :
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
    300,911 Super User 2025 Season 2 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
    300,911 Super User 2025 Season 2 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

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

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans