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

Recurring integration. How to get failed invoice name via REST API?

(5) ShareShare
ReportReport
Posted on by 94
Hello.

Data management REST API ( https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-management-api ; https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/recurring-integrations) allows to get error info if invoice import via recurring job failed and the invoice was NOT created. It's "POST /data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExecutionErrors" and so on.
 
My goal is: identify all failed invoices in the batch I've sent to D365 FO recurring job.
 
But error info does not contain invoice name, however D365 UI contains invoice name in the input message execution info. That invoice was not created in D365.
See a pic.:


A lot of invoices can be in the batch and with help of UI I can learn invoice name of failed invoice. In the input queue there is 1 message for entire batch.

How can I get invoice name from execution history via REST API?
Categories:
  • Suggested answer
    Jo_Blessan Profile Picture
    114 on at

    Hi,

    GetExecutionErrors only returns the error messages, not the business keys of the failed rows. The UI shows the invoice number because it reads it from the staging table.

    A few options to try:

    1. The DMF API also has actions that return download URLs for error files, such as GetImportStagingErrorFileUrl and GetImportTargetErrorKeysFileUrl. The staging error file should contain the failed staging rows, which would include the invoice number. Please check which columns each file actually has.

    2. If that's not enough, create a custom data entity or service that reads the staging table filtered by the execution ID, and returns the invoice numbers of rows with an error status. It needs a bit of development but should be the most reliable.

    You'll need the execution ID for the batch, which you can get from the message status response of the recurring integration.

    Hope this helps!

    Thanks.

  • Martin Dráb Profile Picture
    241,313 Most Valuable Professional on at

    The beggining of your question (such as the first link) mentions the packages API, not the recurring integrations API. Please confirm which one you use, and tell us whether you're open to a change if beneficial (e.g. switching from the recurring integrations API to the packages API, so you can actually use what Jo_Blessan suggested).

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 507 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 419 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 155

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans