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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Retrieve Line No From Journal

(0) ShareShare
ReportReport
Posted on by 60

HI Experts,

I wrote some code to filter the G/L Journal Lines to update one field in the Payment Journal Line.

But when I tried to Debug the code the Line No Returns as Zero. But I actually have line in the Payment Journal.

I can see the Line No on the "Inspect Page" as "10000" . But my code Returns empty line no.

Here is some part of my code,

 procedure GetAppliedVendorEntries(genjoulin: Record "Gen. Journal Line") "Applied Amount": Decimal
    var
        //GenJournalLine: Record "Gen. Journal Line";
        VendorLedgerEntry: Record "Vendor Ledger Entry";
    begin
        genjoulin.SetRange("Journal Template Name", 'PAYMENT');
        genjoulin.SetRange("Journal Batch Name", 'CASH');
        genjoulin.SetRange("Line No.",genjoulin."Line No.");
        genjoulin.SetRange("Document No.", genjoulin."Document No.");
can you give me some suggestion to understand what i am doing wrong here?

  

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,321 Super User 2025 Season 2 on at

    Hi, both are genjoulin variable. And genjoulin variable has not used Find (Findset, Findfirst, and so on) yet, so it is empty. You can declare another variable to pass Line No.

    pastedimage1682384511627v1.png

    Hope this helps.

    Thanks.

    ZHU

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,329

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,250 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,365 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans