Add namespace declarations, fix Code[250] return type, Access=Internal, and AL style in upgrade extension examples#3563
Closed
jeffreybulanadi wants to merge 3 commits into
Conversation
…e[250], add Access=Internal - Add namespace Contoso.ABCShoeExtension to ABC Upgrade Shoe Size, ABC Upgrade Tag Definitions, InstallCodeunit - Add namespace Contoso.MyExtension to MyUpgradeCodeunit preconditions example - Fix GetABCShoeSizeUpgradeTag return type: Text -> Code[250] (HasUpgradeTag/SetUpgradeTag take Code[250]) - Add Access = Internal to all non-template codeunits (upgrade/install codeunits should not be public) - Add using Microsoft.Sales.Customer and using System.Upgrade where needed - Fix Subtype=Upgrade -> Subtype = Upgrade (AL spacing convention) - Remove erroneous trailing semicolons from trigger declarations - Fix error() -> Error() (built-in procedure capitalization) - Fix myInfo : ModuleInfo -> myInfo: ModuleInfo (AL variable spacing) - Add TIP note linking to real SalesForecastUpgrade.Codeunit.al in microsoft/ALAppExtensions Source: ALAppExtensions/Apps/W1/SalesAndInventoryForecast/app/src/codeunits/SalesForecastUpgrade.Codeunit.al
…e.Codeunit.al Port actual production code from microsoft/ALAppExtensions instead of invented tutorial code. Source: Apps/W1/SalesAndInventoryForecast/app/src/codeunits/SalesForecastUpgrade.Codeunit.al - Remove fictional Customer.Shoesize field migration (ABC-1234 invented tag) - Add real codeunit 1851 Sales Forecast Upgrade with namespace Microsoft.Inventory.InventoryForecast - Real tag MS-474737-SalesForecastCustomerConsent-20230607 - Real HasUpgradeTag double-check pattern (database-scope '' + per-company) - Add explanation of key patterns observed in the real code - Link to ReviewGLEntries Upgrade.Codeunit.al for DataTransfer bulk migration pattern
Contributor
|
Learn Build status updates of commit 4b4a5fd: ✅ Validation status: passed
For more details, please refer to the build report. |
Contributor
|
Learn Build status updates of commit c96579e: ✅ Validation status: passed
For more details, please refer to the build report. |
Contributor
|
Learn Build status updates of commit b01e510: ✅ Validation status: passed
For more details, please refer to the build report. |
b01e510 to
e6cea1a
Compare
Contributor
|
Learn Build status updates of commit e6cea1a: ✅ Validation status: passed
For more details, please refer to the build report. |
Contributor
|
@jeffreybulanadi - thanks for your contribution. The PR has been reviewed with a developer and it fixes obvious errors, but we don't want to change the upgrade logic in the example, which is made (simple) for pedagogical reasons. I will close this PR, and take in the suggested error fixes in a different branch. Thanks! |
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 namespace declarations, return types, Access properties, and AL style in upgrade codeunit examples.
Changes
namespace Contoso.ABCShoeExtension;to ABC Upgrade Shoe Size, ABC Upgrade Tag Definitions, InstallCodeunitnamespace Contoso.MyExtension;to preconditions exampleGetABCShoeSizeUpgradeTag(): Text->Code[250](HasUpgradeTag/SetUpgradeTag take Code[250])Access = Internalto all upgrade/install codeunitsusing Microsoft.Sales.Customer;andusing System.Upgrade;where neededSource verification