Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
728
stars
241
forks
source link
Using multiple namespaces for the same pageextension #7599
1. Describe the bug
Project, with multiple namespaces for the same object, does not compile, but gives the following error:
The extension object 'CustomerListExt2' cannot be declared. Another extension for target 'Customer List' or the target itself is already declared in this module. 2. To Reproduce
Create new AL project with two files
namespace DefaultPublisher.myNameSpace1;
using Microsoft.Sales.Customer;
pageextension 50100 CustomerListExt1 extends "Customer List"
{
trigger OnOpenPage();
begin
Message('App published: Hello world1');
end;
}
namespace DefaultPublisher.myNameSpace2;
using Microsoft.Sales.Customer;
pageextension 50101 CustomerListExt2 extends "Customer List"
{
trigger OnOpenPage();
begin
Message('App published: Hello world2');
end;
}
3. Expected behavior
I expect that project compiles successfully, and I can have multiple pageextensions (or any other extension type), for the same project.
According to namespace documentation, it should be possible. My objects are named differently
Just to be sure: Esben wrote yesterday on Yammer/Viva Engage that this feature is being worked on for the next major. I hope you are not working against each other 😛
1. Describe the bug Project, with multiple namespaces for the same object, does not compile, but gives the following error:
The extension object 'CustomerListExt2' cannot be declared. Another extension for target 'Customer List' or the target itself is already declared in this module.
2. To Reproduce Create new AL project with two files3. Expected behavior I expect that project compiles successfully, and I can have multiple pageextensions (or any other extension type), for the same project.
According to namespace documentation, it should be possible. My objects are named differently
5. Versions: