Skip to content

[FR] Redirect payment management pages based on feature state - #13217

Open
ventselartur wants to merge 1 commit into
mainfrom
bugs/656576-PmgtMgtFRPages
Open

ventselartur wants to merge 1 commit into
mainfrom
bugs/656576-PmgtMgtFRPages

Conversation

@ventselartur

@ventselartur ventselartur commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Why

Opening either legacy or FR Payment Management entry links should select the implementation matching the Payment feature state instead of showing a feature-switch error or leaving users on the wrong page.

Summary

  • Add old-to-new redirects in the three FR BaseApp pages using numeric page IDs, without a compile-time dependency on PaymentManagementFR.
  • Redirect the FR pages back to legacy pages when the feature is disabled, and abort opening the original page without a visible error.
  • Remove the two redundant app-side page extensions.
  • Add four regression tests covering all twelve page/link/feature-state combinations.

Linked work

Fixes AB#656576

Route both legacy and FR entry links to the implementation selected by the Payment feature. Keep numeric forward redirects in BaseApp without adding an app dependency, retain reverse redirects in the FR app, and cover all page/state combinations.

Fixes AB#656576

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6eae832b-7968-4b2c-8637-3b3465346541
@github-actions github-actions Bot added the Team: Finance GitHub request for Finance area label Oct 23, 2026
@github-actions github-actions Bot added this to the Version 30.0 milestone Oct 23, 2026
@ventselartur
ventselartur marked this pull request as ready for review October 23, 2026 15:14
begin
if not FeaturePaymentManagement.IsEnabled() then
Error(EnablePaymentManagementFRPageErr);
if not FeaturePaymentManagement.IsEnabled() then begin

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.

$\textbf{🟠\ High\ Severity\ —\ Breaking\ Changes}$

New redirect behavior was added inside a #if not CLEAN28 block in the legacy Payment Report FR page. Code in a CLEAN-guarded obsolete region is scheduled for removal; move the feature-state routing to the supported replacement rather than extending this legacy path.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

FRPaymentSlipTok: Label 'FR Create Payment Slips', Locked = true;
begin
#if not CLEAN28
if not FeaturePaymentManagement.IsEnabled() then begin

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.

$\textbf{🟠\ High\ Severity\ —\ Breaking\ Changes}$

New redirect behavior was added inside a #if not CLEAN28 block in the legacy Payment Slip List FR page. Code in a CLEAN-guarded obsolete region is scheduled for removal; move the feature-state routing to the supported replacement rather than extending this legacy path.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

begin
if not FeaturePaymentManagement.IsEnabled() then
Error(EnablePaymentManagementFRPageErr);
if not FeaturePaymentManagement.IsEnabled() then begin

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.

$\textbf{🟠\ High\ Severity\ —\ Breaking\ Changes}$

New redirect behavior was added inside a #if not CLEAN28 block in the legacy View/Edit Payment Line FR page. Code in a CLEAN-guarded obsolete region is scheduled for removal; move the feature-state routing to the supported replacement rather than extending this legacy path.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

}
}

trigger OnOpenPage()

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.

$\textbf{🟠\ High\ Severity\ —\ Breaking\ Changes}$

New redirect behavior was added to the Payment Report page, which is marked ObsoleteState = Pending and wrapped in #if not CLEAN28. Obsolete code is scheduled for removal; route callers through the supported replacement instead of extending this legacy page.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6


trigger OnOpenPage()
var
FeatureKeyManagement: Codeunit "Feature Key Management";

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.

$\textbf{🟠\ High\ Severity\ —\ Breaking\ Changes}$

New redirect behavior was added to the Payment Slip List page, which is marked ObsoleteState = Pending and wrapped in #if not CLEAN28. Obsolete code is scheduled for removal; route callers through the supported replacement instead of extending this legacy page.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

}
}

trigger OnOpenPage()

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.

$\textbf{🟠\ High\ Severity\ —\ Breaking\ Changes}$

New redirect behavior was added to the View/Edit Payment Line page, which is marked ObsoleteState = Pending and wrapped in #if not CLEAN28. Obsolete code is scheduled for removal; route callers through the supported replacement instead of extending this legacy page.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

#pragma warning disable AL0432
Page.Run(Page::"Payment Report");
#pragma warning restore AL0432
Error('');

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.

$\textbf{🟡\ Medium\ Severity\ —\ Privacy}$

The redirect terminator calls Error with a string literal rather than a Label or TextConst. RT0030 Error method telemetry therefore receives generic guidance instead of a stable, classified error message.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

#pragma warning disable AL0432
Page.Run(Page::"Payment Slip List");
#pragma warning restore AL0432
Error('');

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.

$\textbf{🟡\ Medium\ Severity\ —\ Privacy}$

The redirect terminator calls Error with a string literal rather than a Label or TextConst. RT0030 Error method telemetry therefore receives generic guidance instead of a stable, classified error message.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

#pragma warning disable AL0432
Page.Run(Page::"View/Edit Payment Line");
#pragma warning restore AL0432
Error('');

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.

$\textbf{🟡\ Medium\ Severity\ —\ Privacy}$

The redirect terminator calls Error with a string literal rather than a Label or TextConst. RT0030 Error method telemetry therefore receives generic guidance instead of a stable, classified error message.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

begin
if FeatureKeyManagement.IsPaymentManagementEnabled() then begin
Page.Run(10841); // Payment Report FR
Error('');

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.

$\textbf{🟡\ Medium\ Severity\ —\ Privacy}$

The redirect terminator calls Error with a string literal rather than a Label or TextConst. RT0030 Error method telemetry therefore receives generic guidance instead of a stable, classified error message.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

begin
if FeatureKeyManagement.IsPaymentManagementEnabled() then begin
Page.Run(10846); // Payment Slip List FR
Error('');

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.

$\textbf{🟡\ Medium\ Severity\ —\ Privacy}$

The redirect terminator calls Error with a string literal rather than a Label or TextConst. RT0030 Error method telemetry therefore receives generic guidance instead of a stable, classified error message.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

begin
if FeatureKeyManagement.IsPaymentManagementEnabled() then begin
Page.Run(10857); // View/Edit Payment Line FR
Error('');

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.

$\textbf{🟡\ Medium\ Severity\ —\ Privacy}$

The redirect terminator calls Error with a string literal rather than a Label or TextConst. RT0030 Error method telemetry therefore receives generic guidance instead of a stable, classified error message.

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

FeatureKeyManagement: Codeunit "Feature Key Management";
begin
if FeatureKeyManagement.IsPaymentManagementEnabled() then begin
Page.Run(10841); // Payment Report FR

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.

$\textbf{🟡\ Medium\ Severity\ —\ Style}$

The page is invoked by numeric object ID 10841. Use the named selector Page::"Payment Report FR" so the call remains readable and resilient to object renumbering or renaming.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

            Page.Run(Page::"Payment Report FR"); // Payment Report FR

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

FRPaymentSlipTok: Label 'FR Create Payment Slips', Locked = true;
begin
if FeatureKeyManagement.IsPaymentManagementEnabled() then begin
Page.Run(10846); // Payment Slip List FR

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.

$\textbf{🟡\ Medium\ Severity\ —\ Style}$

The page is invoked by numeric object ID 10846. Use the named selector Page::"Payment Slip List FR" so the call remains readable and resilient to object renumbering or renaming.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

            Page.Run(Page::"Payment Slip List FR"); // Payment Slip List FR

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

FeatureKeyManagement: Codeunit "Feature Key Management";
begin
if FeatureKeyManagement.IsPaymentManagementEnabled() then begin
Page.Run(10857); // View/Edit Payment Line FR

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.

$\textbf{🟡\ Medium\ Severity\ —\ Style}$

The page is invoked by numeric object ID 10857. Use the named selector Page::"View/Edit Payment Line FR" so the call remains readable and resilient to object renumbering or renaming.

Suggested fix (apply manually — could not be anchored as a one-click suggestion):

            Page.Run(Page::"View/Edit Payment Line FR"); // View/Edit Payment Line FR

Knowledge:

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6

This branch was successfully deployed

1 active deployment
triage — f2faf5cb Deployed Oct 23, 2026 by ventselartur via Classify team ownership #8855
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant