Repository navigation
[FR] Redirect payment management pages based on feature state - #13217
ventselartur wants to merge 1 commit into
Conversation
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
| begin | ||
| if not FeaturePaymentManagement.IsEnabled() then | ||
| Error(EnablePaymentManagementFRPageErr); | ||
| if not FeaturePaymentManagement.IsEnabled() then begin |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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(''); |
There was a problem hiding this comment.
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(''); |
There was a problem hiding this comment.
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(''); |
There was a problem hiding this comment.
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(''); |
There was a problem hiding this comment.
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(''); |
There was a problem hiding this comment.
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(''); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 FRKnowledge:
👍 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 |
There was a problem hiding this comment.
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 FRKnowledge:
👍 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 |
There was a problem hiding this comment.
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 FRKnowledge:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.51.6
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
Linked work
Fixes AB#656576