Dynamics 365 F&O

Checking vendor invoice journals from a Power Automate flow

Follow a sample invoice from the input file to its journal header, lines and reconciliation checks.

Article archive date

Keep a record of what the flow attempted

Suppose an input file has two invoices for the same legal entity. Give each source row a stable ID and capture it in the run history or a reconciliation table. Alongside it, retain the legal entity, the journal batch number returned by Dynamics 365, the attempted line count and the result of each write.

Use the legal entity returned for the header when checking the lines. A journal batch number without that context can be ambiguous across companies.

Verify the journal before posting

For an invoice row, compare the vendor, invoice number, currency and posting date with the input. Check that the ledger offset belongs to the expected account and company for your scenario. If you operate across companies, include one test case whose expected offset differs by entity.

Use a test environment and fictional vendors and amounts. The exact fields depend on your journal entity and the configuration in your environment.

Reconcile before you retry

If the flow reports an error, look for the header and lines already present in Dynamics 365. Use the source row IDs and your reconciliation record to identify what succeeded.

  • If only the header exists, check whether it can safely be reused for the missing lines.
  • If some lines exist, reconcile them with the input before resubmitting anything.
  • If the status is uncertain, hold the flow for review and compare the journal with the original source before retrying or posting.

The test case is complete when you can account for each source row once and explain the state of the journal after an interrupted run.

Keep reading