Skip to content

[Extensibility Request] issue 29518: make document logo position extensible - #10540

Open
Marko Aleksandric (AleksandricMarko) wants to merge 7 commits into
mainfrom
ai-ext-fix/ext_issue-29518
Open

Marko Aleksandric (AleksandricMarko) wants to merge 7 commits into
mainfrom
ai-ext-fix/ext_issue-29518

Conversation

@AleksandricMarko

@AleksandricMarko Marko Aleksandric (AleksandricMarko) commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extensions need to support additional company logo placements on sales documents, but the current setup field is a fixed option. This PR converts the field to an extensible, assignment-compatible enum while retaining the existing values and persisted ordinals.

Source issue repository: microsoft/AlAppExtensions; issue number: 29518

Changes Made

  • Logo Position on Documents - added an extensible enum with the existing logo positions and assignment compatibility.
  • Sales & Receivables Setup.Logo Position on Documents - changed the field from Option to the new enum in W1 and all existing layer counterparts.

Fixes AB#616632

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AleksandricMarko

Copy link
Copy Markdown
Contributor Author

Copilot it is necessary to check all places where field is used and to determine if it is needed to update usage
procedure SetLogoPosition accepts option, it would be the best to create new one which will accept enum (and which will call existing one)

Co-authored-by: AleksandricMarko <133204513+AleksandricMarko@users.noreply.github.com>

Copilot AI commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Copilot it is necessary to check all places where field is used and to determine if it is needed to update usage
procedure SetLogoPosition accepts option, it would be the best to create new one whi...

Added a new SetLogoPosition overload in FormatDocument.Codeunit.al that accepts Enum "Logo Position on Documents" and delegates to the existing Option-based procedure. All other usages of the field pass it directly to SetLogoPosition, which now resolves to the new overload automatically. See commit e.g. the latest push.

@github-actions github-actions Bot added needs-approval Workflow runs require maintainer approval to start and removed needs-approval Workflow runs require maintainer approval to start labels Aug 23, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7fd29cf0-bf3b-4d3b-98f6-c1a286323ca8
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 693efd27-6751-4014-aa11-5b769c0c5f41
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 693efd27-6751-4014-aa11-5b769c0c5f41
Comment thread src/Layers/W1/BaseApp/Sales/Setup/SalesReceivablesSetup.Table.al
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Accept

What this PR does

This change converts the sales document logo-position setup from a fixed option to an extensible enum in W1 and the existing country-layer copies. It preserves the four stored ordinals and keeps the existing option-based SetLogoPosition procedure while adding an enum overload for updated callers.

The changed report callers either resolve to the new enum overload or convert to an integer only where the report dataset already stores the position as an integer. The conversion paths keep the existing behavior for the built-in values and allow extensions to add new enum values without replacing the setup field.

Problem-solution fit

Fit: Strong

The requested behavior is an extensible setup value for additional logo positions. The field type, enum extensibility, persisted value mapping, and main call sites are updated together without removing the existing public option overload.

Suggestions

None.

Risk assessment and necessity

Risk: This changes a persisted table field type across several application layers, so upgrade and extension compatibility are the main risks. Matching enum ordinals, assignment compatibility, and the retained option overload limit that risk; no report layout binary or rendered layout is changed.

Necessity: The change is needed so extensions can define additional company-logo positions instead of being limited to four fixed option members. The scope is focused on the setup field and its direct consumers.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10540 round=1 by=alexei-dobriansky at=2026-10-13T00:08:20Z lastSha=a1b4a9841f039e8b96c0600592bcddee88fcafad reviewKey=c9934be8972f7365cba24241c0a9fdb148154e8273bf7d06c27e8150b708dd21 suggestions=none

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The persisted enum values retain the original option ordinals, all Sales & Receivables Setup layer definitions are converted consistently, and compatibility is preserved through AssignmentCompatibility plus the retained option overload. Explicit conversions cover integer report datasets and RapidStart assignments. No blocking correctness issues found.

@attilatoury

Copy link
Copy Markdown
Contributor

The enum conversion looks sound, but two missed consumer updates introduce AL0603 warnings that fail the new-warning CI gate:

  • APAC tests: In UTVATForSEA, change the LogoPositionOnDocuments parameter from Option to Enum "Logo Position on Documents" in UpdateSalesReceivablesSetup, OnAfterGetRecordSalesTaxInvoice, and OnAfterGetRecordSalesTaxCrMemoHeader. The remaining conversions cause nine new warnings in AU/NZ builds.
  • Czech report: Add .AsInteger() to the setup-field assignment in StdSalesProFormaInvCZL, matching the other report updates. This causes the single new warning in CZ.

These are small CI-blocking fixes, not demonstrated runtime defects. Please update these consumers and rerun the affected builds; no replacement field or redesign is needed.

Use the logo position enum in local APAC test helpers and explicitly convert the Czech report dataset value to Integer. Existing event signatures remain unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 206c3a8e-61b7-42ba-8b98-dba77dc957f2
Comment thread src/Layers/W1/BaseApp/Sales/Setup/SalesReceivablesSetup.Table.al
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 2

Recommendation: Accept

What this PR does

The latest commit updates the remaining consumers of the converted logo-position field. The APAC test helpers now use the enum directly, and the Czech report explicitly converts the enum to the integer type already used by its dataset column.

These changes remove the implicit enum-to-option/integer conversions without changing the existing report behavior or event signatures.

Status of previous suggestions

None were raised in round 1.

New observations (commits since round 1)

None. The new changes are consistent with the field conversion and introduce no additional review findings.

Risk assessment and necessity

Risk: The latest changes are limited to type alignment. The APAC edits are in test helpers, and the Czech report keeps the same integer dataset value by using AsInteger(). Current checks pass, with only expected skipped jobs.

Necessity: These updates are needed to remove the remaining conversion warnings after changing the setup field from an option to an extensible enum.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10540 round=2 by=alexei-dobriansky at=2026-10-15T12:53:12Z lastSha=a8dc25d1b1423ccfd501b0851a61e0112b6fd703 reviewKey=f4065b173fa3419284ee05f6f3cf5b276918d9d41c467e58c7029df7af9b69cd suggestions=none parentRound=1

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

This branch was successfully deployed

1 active deployment
triage — a8dc25d1 Deployed Oct 22, 2026 by AleksandricMarko via Classify team ownership #8745
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 enum-request Team: SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants