Skip to content

[28.x][Payables Agent] Users can personalize-in the Name column on the draft page#9215

Merged
Explorer986 merged 2 commits into
releases/28.xfrom
backport/releases/28.x/641033
Jul 9, 2026
Merged

[28.x][Payables Agent] Users can personalize-in the Name column on the draft page#9215
Explorer986 merged 2 commits into
releases/28.xfrom
backport/releases/28.x/641033

Conversation

@Explorer986

@Explorer986 Explorer986 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What & why

This change adds a read-only Name column to the E-Document purchase draft lines subform (page 6183 E-Doc. Purchase Draft Subform). The column shows the name of the matched entity such as Item, G/L Account, or Resource, so reviewers can confirm a line was matched to the right record. It stays hidden by default and users personalize it into view. The value reflects the matched record rather than the extracted invoice description and cannot be edited.

Linked work

Fixes AB#641589

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) 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

  • Built E-Document Core locally with no errors and no new analyzer warnings.
  • Published to a local sandbox and opened the Purchase Document Draft page.
  • Personalized the Name column into the Lines part and confirmed it shows the matched entity name, stays read-only, and updates when Type or No. change.
  • Confirmed the column is blank for lines with no match and that it reflects the matched record rather than the edited Description.
  • No automated tests added yet. The change is a small refactor of the existing SetDescriptionFromLineTypeNo behavior. I can add a codeunit test asserting GetMatchedEntityName returns the right value per line type if reviewers prefer.

Risk & compatibility

  • Low risk. No table schema change and no new stored fields.
  • The Name value binds to a page variable computed in OnAfterGetRecord, so there is no data upgrade impact.
  • Existing description defaulting behaves the same because it now calls the shared GetMatchedEntityName helper.
  • The new OnAfterGetMatchedEntityName integration event is additive for connector apps.

Adds a hidden-by-default, read-only 'Name' column to the E-Document purchase draft lines subform (page 6183 'E-Doc. Purchase Draft Subform') showing the name of the matched entity (Item, G/L Account, Resource, etc.). Users can personalize it into view. The value reflects the matched record, not the extracted invoice description, and is read-only.

- Extract the polymorphic Type+No. -> entity-name lookup from SetDescriptionFromLineTypeNo into a reusable GetMatchedEntityName() on table 6101 'E-Document Purchase Line' (non-redundant; description defaulting and the column now share one code path).

- Add OnAfterGetMatchedEntityName integration event so connector apps can resolve names for custom purchase line types.

- Bind the new column to a page variable computed in OnAfterGetRecord; no table schema change.
Addresses PR review: load only the name/description field for each matched entity Get (Item, G/L Account, Allocation Account, Fixed Asset, Resource, Item Charge).
@Explorer986 Explorer986 requested review from a team July 8, 2026 09:48
@Explorer986 Explorer986 requested a review from a team as a code owner July 8, 2026 09:48
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jul 8, 2026
@github-actions github-actions Bot added this to the Version 28.4 milestone Jul 8, 2026
@Explorer986 Explorer986 added the Finance GitHub request for Finance area label Jul 8, 2026
@Explorer986 Explorer986 merged commit f80cb90 into releases/28.x Jul 9, 2026
40 checks passed
@Explorer986 Explorer986 deleted the backport/releases/28.x/641033 branch July 9, 2026 09:52
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 Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants