Skip to content

Using multiple namespaces for the same pageextension #7599

@gntpet

Description

@gntpet

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

image

5. Versions:

  • AL Language: v12.3.900902
  • Visual Studio Code: 1.84.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions