Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

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

(1) ShareShare
ReportReport
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?
 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,661 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans