web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Get invoices of payment using AL

(0) ShareShare
ReportReport
Posted on by 6
Hi Community, 
 
I creating a page extension in Bank Ledger entries where i created a action button. the button supposed to get the invoices applied to the selected line and will use the info of the invoice/s to add a line in a custom table. the problem is, the code i did manage to capture the information of the invoice only if there is only one invoice applied to the transaction. if the transaction has more than 1 invoices applied to it, for some reason the code only read one of the invoice. How can i capture the information of all the invoices applied.
 
 
this is the code of the function that im currently using for testing:
 
     var
        VLE: Record /Vendor Ledger Entry/;
        DVLE: Record /Detailed Vendor Ledg. Entry/;
        Comment: text;
     begin
        VLE.Get(Rec./Entry No./ + 1);
        DVLE.SetFilter(/Applied Vend. Ledger Entry No./, '%1', VLE./Entry No./);
        DVLE.SetFilter(/Vendor Ledger Entry No./, '<>%1', VLE./Entry No./);
        if (DVLE.FindSet()) then
            repeat
                message('Doc No: %1', DVLE./Document No./);
            until DVLE.Next() = 0;
     end;
The function supposed to supposed to popup several message showing the document no of the of the invoices depending by the number of invoice applied to it. but this only showed 1 invoice eventhough there supposed to be more than 1. Please Assist
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,547 Most Valuable Professional on at
    Hi
    This report is likely to give you some ideas.
    BR
    GR

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans