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