Skip to content

[Payables Agent] set Document Date and Due Date on Incomming Document when Draft is created#9575

Open
Explorer986 wants to merge 1 commit into
mainfrom
private/kumarjatin/642321
Open

[Payables Agent] set Document Date and Due Date on Incomming Document when Draft is created#9575
Explorer986 wants to merge 1 commit into
mainfrom
private/kumarjatin/642321

Conversation

@Explorer986

@Explorer986 Explorer986 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What & why

When an inbound E-Document is imported, the Prepare draft step already fills in the vendor name and number from the E-Document Purchase Header. But it was not filling in the Document Date and Due Date.

Because of this, once a document reached the Draft ready status, the Document Date and Due Date columns showed up empty on the Inbound E-Documents list, even though those values were already present on the E-Document Purchase Header.

This fix copies the Document Date and Due Date from the E-Document Purchase Header onto the E-Document during the Prepare draft step. It only copies them when they actually have a value, so an existing date is never replaced with a blank one. This is the same approach already used for the vendor name and number. Now both dates show correctly on the Inbound E-Documents list once the document reaches Draft ready.

Linked work

Fixes AB#642321

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome

I imported an inbound purchase E-Document and processed it until it reached the Draft ready status. The Document Date and Due Date then showed up correctly on the Inbound E-Documents list and matched the values on the E-Document Purchase Header.

I also checked the case where the E-Document Purchase Header has no date set. In that case the existing values on the E-Document were left as they were and did not get overwritten with a blank date.

I confirmed that the vendor name and number still resolve the same way as before.

Risk & compatibility

Low risk. The change only fills in two extra fields, Document Date and Due Date, during the existing Prepare draft step, and it does so only when a value is present. There are no schema changes, no permission changes, and no impact on the Version 1.0 import path.

…ng for vendor name and no. from EDocumentPurchaseHeader so that Document date and Due date are availbe on InboundEdocumentlist after draft-ready status
@Explorer986
Explorer986 requested review from a team July 17, 2026 10:44
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 Integration GitHub request for Integration area labels Jul 17, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 1 · Outcome: completed

Knowledge source: https://github.com/microsoft/BCQuality@186d8a131465475c79244d994acb872cd5c0d4bf

Orchestrator pre-filter (2 file(s) excluded)

  • layer-disabled (knowledge) : 2 file(s)

Findings produced by the AL review agent v1.7.3. Reply 👎 on any inline comment to flag false positives.

@Explorer986 Explorer986 added the Finance GitHub request for Finance area label Jul 17, 2026
@github-actions github-actions Bot removed the Finance GitHub request for Finance area label Jul 17, 2026
@Explorer986 Explorer986 added the Finance GitHub request for Finance area label Jul 17, 2026
@github-actions github-actions Bot removed the Finance GitHub request for Finance area label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant