Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Can't reference custom page

(0) ShareShare
ReportReport
Posted on by 22

Hi All,

Just a quick question, I created a new page and would like to reference this page for a trigger that i created on a pageextension (for an existing page)

however, when i try this , I'm getting 'Page' does not contain a definition for 'Page name' AL1032

Is this possible? If not is there any way that I can get around this without reinventing the wheel?

Thanks
Rajiv

  • rajivsewsarran Profile Picture
    rajivsewsarran 22 on at
    RE: Can't reference custom page

    Hi Nitin,

    Im not quite sure what im missing, but ill have a look at the link.

    Thanks again for your help.

    Regards

    Rajiv

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,081 Super User 2024 Season 1 on at
    RE: Can't reference custom page

    Hi rajivsewsarran ,

    You are not following what I asked you to do, I will request you please go through some basic AL code, it will help you to understand how to use AL syntax, Please follow the below link:

    docs.microsoft.com/.../setrange-function--record-

    Also please correct your Journal Template and Batch name setrange method, then it will you correct result.

    Thanks.

  • rajivsewsarran Profile Picture
    rajivsewsarran 22 on at
    RE: Can't reference custom page

    esc1.PNGesc2.PNG

     trigger OnDrillDown()
                    var
                        GenJournalLine: Record "Gen. Journal Line";
    
    
                    begin
                        GenJournalLine.SetRange("Account Type", GenJournalLine."Account Type"::"Bank Account");
                        GenJournalLine.SetRange("Account No.", Rec."No.");
                        GenJournalLine.setrange("Journal Batch Name");
    
                        Page.RunModal(Page::"Payment Journal", GenJournalLine);
    
                    end;
    
    
    Hi Nitin,

    I believe i did that and this is what im getting

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,081 Super User 2024 Season 1 on at
    RE: Can't reference custom page

    You have to also setrange the Journal Template and Batch name field for the same payment journal and make sure there should be some lines exist in payment journal for the same Template and batch

    Thanks.

  • rajivsewsarran Profile Picture
    rajivsewsarran 22 on at
    RE: Can't reference custom page

    Hi Nitin,

    Thanks for this.

    When i drill into the escrow payments , it takes me  to the payment journal screen as expected, but everything is blank.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,081 Super User 2024 Season 1 on at
    RE: Can't reference custom page

    Please use this.

    field("Escrow Payments"; Rec."Escrow Payments")

             {

                 ApplicationArea = all;

                 Caption = 'Escrow Payments';

                 DrillDown = true;

                 trigger OnDrillDown()

                 var

            GenJournalLine: Record "Gen. Journal Line";

       begin

           GenJournalLine.SetRange("Account Type",GenJournalLine."Account Type"::"Bank Account");

           GenJournalLine.SetRange("Account No.","No.");

           page.RunModal(page::"Payment Journal",GenJournalLine);

                 end;

  • rajivsewsarran Profile Picture
    rajivsewsarran 22 on at
    RE: Can't reference custom page

    Hi Nitin,

    Sorry what i wanted to know , instead of creating the new t able.

    Is it possible for me to drilldown from the Bank Account list, on m,y extension called "Escrow Payments" into the Payments Journal with the result being all of the payments that are assigned to the Bal. Account Number , rather than the Batch.

    If not , then i will have to use the new table and page.

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,081 Super User 2024 Season 1 on at
    RE: Can't reference custom page

    Yes. I am sure you are putting the data in your new table right? then in that case you have to use your custom table.

  • rajivsewsarran Profile Picture
    rajivsewsarran 22 on at
    RE: Can't reference custom page

    Which page do you need me to use this on? the new one i created?

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,081 Super User 2024 Season 1 on at
    RE: Can't reference custom page

    You are not using what I sent you.

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