Add namespace declarations, DataClassification, Access=Internal, and AL style fixes to extension example#3564
Merged
SusanneWindfeldPedersen merged 1 commit intoMay 19, 2026
Conversation
…cess=Internal, fix semicolon All complete AL object definitions now include namespace Contoso.Rewards and using directives, matching real production patterns from microsoft/ALAppExtensions. Objects updated: - table 50100 Reward: namespace + DataClassification = CustomerContent on all fields (was ToBeClassified on field 1 Reward ID, missing on fields 2-3) - page 50101 Reward Card: namespace - page 50102 Reward List (both occurrences): namespace - tableextension 50103 Customer Ext: namespace + using Microsoft.Sales.Customer + DataClassification = CustomerContent on Reward ID field + fixed missing semicolon on Error() call + fixed trigger OnValidate(); -> OnValidate() (no trailing semicolon) - pageextension 50104 Customer Card Ext: namespace + using Microsoft.Sales.Customer - codeunit 50105 RewardsInstallCode: namespace + Access = Internal + fixed trigger OnInstallAppPerCompany(); -> OnInstallAppPerCompany() - codeunit 50106 RewardsUpgradeCode: namespace + Access = Internal + fixed trigger OnUpgradePerCompany(); -> OnUpgradePerCompany() Source patterns from: ALAppExtensions/Apps/W1/ReviewGLEntries/app/src/tables/GLEntryReviewSetup.Table.al ALAppExtensions/Apps/W1/LatePaymentPredictor/app/src/LatePaymentInstall.Codeunit.al
Contributor
|
Learn Build status updates of commit 4995323: ✅ Validation status: passed
For more details, please refer to the build report. |
4995323 to
b9cbd5f
Compare
Contributor
|
Learn Build status updates of commit b9cbd5f: ✅ Validation status: passed
For more details, please refer to the build report. |
b9cbd5f to
9b7a026
Compare
Contributor
|
Learn Build status updates of commit 9b7a026: ✅ Validation status: passed
For more details, please refer to the build report. |
SusanneWindfeldPedersen
approved these changes
May 19, 2026
Contributor
|
Thanks for your contribution, much appreciated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all AL code blocks in the Getting Started extension example so examples compile correctly and follow current AL best practices (namespaces, DataClassification, Access modifiers).
Changes in
devenv-extension-example.mdNamespace declarations (7 objects)
All complete AL object definitions now include
namespace Contoso.Rewards;as required since AL v24. Objects fixed:table 50100 Reward,page 50101 Reward Card,page 50102 Reward List(both occurrences),tableextension 50103 Customer Ext,pageextension 50104 Customer Card Ext,codeunit 50105 RewardsInstallCode,codeunit 50106 RewardsUpgradeCode.Where objects reference types from other modules,
usingdirectives added:using Microsoft.Sales.Customer;on tableextension and pageextensionCustomerrecord reference to resolveDataClassification fixes
The table had
DataClassification = ToBeClassified;(triggers AppSourceCop warning AA0240). All fields now have explicitDataClassification = CustomerContent;:table 50100(table-level)ToBeClassifiedCustomerContentReward IDToBeClassifiedCustomerContentDescriptionCustomerContentDiscount PercentageCustomerContentReward IDCustomerContentSource:
ALAppExtensions/Apps/W1/ReviewGLEntries/app/src/tables/GLEntryReviewSetup.Table.al— real table with explicitDataClassificationon all fields.Access = Internal on install/upgrade codeunits
Added
Access = Internal;toRewardsInstallCodeandRewardsUpgradeCode. These codeunits are invoked by the platform at install/upgrade time, not by other AL code. Exposing them as Public (default) is unnecessary and misleading.Source: Every upgrade/install codeunit in
microsoft/ALAppExtensionsusesAccess = Internal.Syntax fixes
Error('Cannot update the rewards status of a blocked customer.')— AL requires;at end of statements;from trigger declarations:trigger OnValidate();→trigger OnValidate(), etc. (AL triggers don't use semicolon)Source verification
microsoft/ALAppExtensionsALAppExtensions/Apps/W1/ReviewGLEntries/app/src/tables/GLEntryReviewSetup.Table.alALAppExtensions/Apps/W1/LatePaymentPredictor/app/src/LatePaymentInstall.Codeunit.al