AL
AL copied to clipboard
Change casing of Control Name breaks Upgrade
Please include the following with each issue:
1. Describe the bug
Changing the casing of the name of a control breaks updates when the control is used with addafter
.
2. To Reproduce Steps to reproduce the behavior:
- Lets have two Apps: PteA and PteB. PteB has a dependency to PteA.
- PteA has a Page Extension:
pageextension 50100 PTEACustomerCard extends "Customer Card"
{
layout
{
addfirst(General)
{
field(PTEADeMoFiElD; WorkDate())
{
ApplicationArea = All;
}
}
}
}
- Publish and Install PteA
- PteB has a PageExtensions which references the new pagefield of PteA:
pageextension 50101 PTEBCustomerCard extends "Customer Card"
{
layout
{
addafter(PTEADeMoFiElD){
field(PTEBAnotherField; Today())
{
ApplicationArea = Basic, Suite;
}
}
}
}
- Publish and Install PteB
- Change the casing of the new field in PteA
pageextension 50100 PTEACustomerCard extends "Customer Card"
{
layout
{
addfirst(General)
{
field(PTEADemoField; WorkDate()) //was PTEADeMoFiElD
{
ApplicationArea = All;
}
}
}
}
- Increase Version (v2) of PteA and Compile
- Publish, Sync, (try) Upgrade of PteA v2
- See Error Message:
Publishing C:\ProgramData\BcContainerHelper\Extensions\appsource\7e20e553-3779-4a0d-874d-edeced1283f3\Default publisher_PteA_2.0.0.0.app
Synchronizing PteA on tenant default
Upgrading PteA on tenant default
An error occurred while applying changes from the object of type 'PageExtension' with ID '50101' in the 'PteB by Default publisher 1.0.0.0' app to the application object of ty
pe 'Page' with the ID '21'. Failing delta: Type: 'ControlAddDelta'; TargetKind: 'Content'; Operation: 'ContentAfter'; TargetId: '293666598'; ContainerType: 'ContentArea'; The
error was: InvalidOperationException - Metadata delta application failed due to the following error(s): The metadata object PTEADeMoFiElD was not found.
Code and Binaries: ControlAddDelta.zip
3. Expected behavior I would expect the upgrade to succeed since the AL is case insensitive (exept at this).
4. Actual behavior Error occures as written above and breaks upgrade of appsource apps (PteA) if someone used your Control as reference.
5. Versions:
- AL Language: 10.3.11.10307
- Visual Studio Code: 1.74.3
- Business Central: 21.3.51409.51464
- List of Visual Studio Code extensions that you have installed:
Final Checklist
Please remember to do the following:
-
[x] Search the issue repository to ensure you are reporting a new issue
-
[x] Reproduce the issue after disabling all extensions except the AL Language extension
-
[x] Simplify your code around the issue to better isolate the problem