Skip to main content

Notifications

Business Central forum
Unanswered

error AL0334: The extension object '***' cannot be declared. ...target itself is already declared

Posted on by 6
I want to make a XMLPort to my page, my page hasn't been done by extends yet. Here is my page:

 
page 50102 /Coupon List/
{
    PageType = List;
    CardPageId = /Coupon Page/;
    ApplicationArea = All;
    UsageCategory = Administration;
    SourceTable = Coupon;
 
    layout
    {
        area(Content)
        {
            repeater(Group)
            {
                field(coupon_code; Rec.coupon_code)
                {
                    ApplicationArea = All;
                }
                field(/Title/; Rec./Coupon Title/)
                {
                    ApplicationArea = All;
 
                }
                field(/Type/; Rec.coupon_type)
                {
                    ApplicationArea = All;
 
                }
                field(/Start Date/; Rec.coupon_StartDate)
                {
                    ApplicationArea = All;
 
                }
                field(/End Date/; Rec.coupon_EndDate)
                {
                    ApplicationArea = All;
 
                }
                field(/TimeZone/; Rec.coupon_timeZone)
                {
                    ApplicationArea = All;
 
                }
            }
        }
    }
 
    actions
    {
        area(Processing)
        {
            action(ActionName)
            {
                ApplicationArea = All;
 
                trigger OnAction()
                begin
 
                end;
            }
        }
        area(Navigation)
        {
            action(/Redeem Record/)
            {
                ApplicationArea = All;
                AboutText = 'The Coupon Redeem History List';
                Caption = 'Redeem Record';
                RunObject = page /RedeemCoupon List/;
 
            }
        }
    }
 
    var
        myInt: Integer;
}

 
And then I do the extends:

pageextension 50111 XMLExportCoupon extends /Coupon List/
{
 
    actions
    {
        // addafter(History)
        // {
        //     action(ExportItem)
        //     {
        //         Caption = 'Export';
        //         Promoted = true;
        //     }
        // }
    }
 
    var
        myInt: Integer;
}

 
I faced the error by
The extension object 'XMLExportCoupon' cannot be declared. Another extension for target 'Coupon List' or the target itself is already declared in this module.ALAL0334
 
Is there anyone can help me?
 
Categories:

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,971 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans