[Payables Agent] set Document Date and Due Date on Incomming Document when Draft is created#9575
Open
Explorer986 wants to merge 1 commit into
Open
[Payables Agent] set Document Date and Due Date on Incomming Document when Draft is created#9575Explorer986 wants to merge 1 commit into
Explorer986 wants to merge 1 commit into
Conversation
…ng for vendor name and no. from EDocumentPurchaseHeader so that Document date and Due date are availbe on InboundEdocumentlist after draft-ready status
Contributor
Copilot PR ReviewIteration 1 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@186d8a131465475c79244d994acb872cd5c0d4bf Orchestrator pre-filter (2 file(s) excluded)
Findings produced by the AL review agent v1.7.3. Reply 👎 on any inline comment to flag false positives. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.