Address Marketplace review feedback

This commit is contained in:
demiliani 2026-09-07 17:50:59 +02:00
parent 2ec109e534
commit e451e92f5d
9 changed files with 15 additions and 11 deletions

View file

@ -11,7 +11,7 @@ application-area: [all]
## Description
Profiles delivered by an AppSource extension must be declared as AL `profile` objects. A profile object is validated with its Role Center and page customizations when the extension is compiled and is registered through extension synchronization. Inserting profile-table records from install or setup code bypasses that object lifecycle.
Profiles delivered by a Marketplace extension must be declared as AL `profile` objects. A profile object is validated with its Role Center and page customizations when the extension is compiled and is registered through extension synchronization. Inserting profile-table records from install or setup code bypasses that object lifecycle.
## Best Practice

View file

@ -11,7 +11,7 @@ application-area: [all]
## Description
AppSource extensions run for users and services in many time zones. Adding a fixed offset to a `DateTime` assumes one locale, ignores daylight-saving transitions, and changes an absolute timestamp into an incorrect value for other regions.
Marketplace extensions run for users and services in many time zones. Adding a fixed offset to a `DateTime` assumes one locale, ignores daylight-saving transitions, and changes an absolute timestamp into an incorrect value for other regions.
## Best Practice

View file

@ -1,6 +1,6 @@
codeunit 50100 "Rental Company Open"
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"System Initialization", OnAfterCompanyOpen, '', false, false)]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Application Management", OnAfterCompanyOpen, '', false, false)]
local procedure InitializeRentalSetup()
var
RentalSetup: Record "Rental Setup";

View file

@ -11,7 +11,7 @@ application-area: [all]
## Description
AppSource extensions must not subscribe to `OnBeforeCompanyOpen` or `OnAfterCompanyOpen`. These events run on the sign-in path, where an error can prevent access and even small amounts of work affect every company open. Move initialization to installation, upgrade, new-company initialization, or the first use of the feature instead.
Marketplace extensions must not subscribe to `OnBeforeCompanyOpen` or `OnAfterCompanyOpen`. These events run on the sign-in path, where an error can prevent access and even small amounts of work affect every company open. Move initialization to installation, upgrade, new-company initialization, or the first use of the feature instead.
## Best Practice

View file

@ -5,13 +5,17 @@ codeunit 50100 "Rental Service"
var
RentalAgreement: Record "Rental Agreement";
begin
if not Confirm('Close rental agreement %1?', false, AgreementNo) then
if not Confirm(CloseAgreementQst, false, AgreementNo) then
exit(false);
RentalAgreement.Get(AgreementNo);
RentalAgreement.Closed := true;
RentalAgreement.Modify(true);
Message('Rental agreement %1 was closed.', AgreementNo);
Message(AgreementClosedMsg, AgreementNo);
exit(true);
end;
var
CloseAgreementQst: Label 'Close rental agreement %1?';
AgreementClosedMsg: Label 'Rental agreement %1 was closed.';
}

View file

@ -11,7 +11,7 @@ application-area: [all]
## Description
Pages and codeunits exposed as web services run without an interactive client. Calls that require a UI callback, including `Message`, `Confirm`, `StrMenu`, and modal pages, can terminate the service request instead of completing the operation.
Pages and codeunits exposed as web services run without an interactive client. Calls that require a UI callback, including `Confirm`, `StrMenu`, and modal pages, can terminate the service request instead of completing the operation. `Message` does not raise the callback error: the message is suppressed and logged, making it ineffective for communicating a service result.
## Best Practice
@ -21,6 +21,6 @@ See sample: `keep-web-service-paths-free-of-ui-calls.good.al`.
## Anti Pattern
A web-service-exposed page or codeunit calls an interactive UI method directly or indirectly. Detection signals include `Message`, `Confirm`, `StrMenu`, `Page.RunModal`, and confirmation-dialog pages on a service call path. Do not flag a controlled `Error` solely because it returns a service fault.
A web-service-exposed page or codeunit calls an interactive UI method directly or indirectly. Detection signals include `Message`, `Confirm`, `StrMenu`, `Page.RunModal`, and confirmation-dialog pages on a service call path. Treat `Message` as suppressed and ineffective, not as a callback failure. Do not flag a controlled `Error` solely because it returns a service fault.
See sample: `keep-web-service-paths-free-of-ui-calls.bad.al`.

View file

@ -21,6 +21,6 @@ See sample: `place-page-extension-actions-with-addfirst-or-addlast.good.al`.
## Anti Pattern
Using `addbefore` or `addafter` to place newly added actions next to a specific action from another app. The syntax is valid AL, but the placement anchor is brittle for an AppSource extension.
Using `addbefore` or `addafter` to place newly added actions next to a specific action from another app. The syntax is valid AL, but the placement anchor is brittle for a Marketplace extension.
See sample: `place-page-extension-actions-with-addfirst-or-addlast.bad.al`.

View file

@ -11,7 +11,7 @@ application-area: [all]
## Description
Write fixed dates in AL with the invariant `yyyymmddD` syntax. A locale-dependent text value parsed with `Evaluate` can change meaning or fail under another user's regional settings, which makes the extension unreliable across AppSource markets.
Write fixed dates in AL with the invariant `yyyymmddD` syntax. A locale-dependent text value parsed with `Evaluate` can change meaning or fail under another user's regional settings, which makes the Marketplace extension unreliable across markets.
## Best Practice

View file

@ -52,7 +52,7 @@ The following targeted checks cover every current `appsource` article across the
- Install, upgrade, or setup code provisions an app-owned profile through `Record Profile` and `Insert` instead of declaring a `profile` object — `define-profiles-as-al-objects`.
- A hard-coded or label-backed formatted string is converted to `Date` with `Evaluate` — `use-invariant-date-literals`. Do not select this article for variable external input whose format must be validated at runtime.
- A page extension uses `addbefore` or `addafter` to place a newly added action relative to a specific action owned by another app — `place-page-extension-actions-with-addfirst-or-addlast`. Do not flag those keywords in layouts or placement relative to an action owned by the same extension.
- A page or codeunit web-service entry point, including a `[ServiceEnabled]` procedure, contains or reaches `Message`, `Confirm`, `StrMenu`, `Page.RunModal`, or a confirmation-dialog page without an effective non-GUI guard — `keep-web-service-paths-free-of-ui-calls`. Do not treat a controlled `Error` as interactive UI solely because it returns a service fault.
- A page or codeunit web-service entry point, including a `[ServiceEnabled]` procedure, contains or reaches `Message`, `Confirm`, `StrMenu`, `Page.RunModal`, or a confirmation-dialog page without an effective non-GUI guard — `keep-web-service-paths-free-of-ui-calls`. Treat `Message` as suppressed and logged, making it ineffective as a service response; treat the other UI calls as callback-failure risks. Do not treat a controlled `Error` as interactive UI solely because it returns a service fault.
- A page or report that repository context identifies as a direct user entry point omits `UsageCategory` or sets it to `None` — `set-usagecategory-on-searchable-entry-points`. Do not select this article based only on object type; exclude supporting parts, dialogs, API pages, and objects intentionally reached through another page.
- A `DateTime` assignment adds or subtracts a fixed duration to represent an assumed regional offset — `do-not-hard-code-time-zone-offsets`. Require contextual evidence such as an hour-sized constant, offset-oriented name, or time-zone comment; do not flag deadlines, schedules, or elapsed-time calculations.