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...
Suggested Answer

How to automatically post one of the Item Journal Batches?

(0) ShareShare
ReportReport
Posted on by 50

Hello everyone,

At present, the JOB QUEUE of automatic posting OUTPUT JOURNAL has been added.

but only post Item Journal Batches="MAKD".

If I want to automatically post Item Journal Batches="0086",

how can I write it in AL CODE? Thank you!

pastedimage1675390052734v2.png

pastedimage1675390015019v1.png

  • Suggested answer
    Mohana Yadav Profile Picture
    61,260 Super User 2026 Season 2 on at

    You have to filter the Item Journal with Template and batch with the values you need, Pass the Item Journal to the posting codeunit.

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Go with the same job queue through Code, and pass the same Item journal batch and Template name, it will start posting data from the same batch you are looking for.

  • Hsuan Hung Profile Picture
    50 on at

    Thank you!

    But I want to know how to write in AL CODE, I am not so familiar with AL CODE

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Ok,

    For sake of idea you can use as per something below

    PaymentJournal.Init();

               PaymentJournal."Journal Template Name" := Rec."Pmt Jnl Template Name";

               PaymentJournal."Journal Batch Name" := Rec."Pmt Jnl Batch Name";

               PaymentJournal."Line No." := LineNO;

               EVALUATE(PaymentJournal."Posting Date", GetValueAtCell(RowNo, 1));

               EVALUATE(PaymentJournal."Document Type", GetValueAtCell(RowNo, 2));

               EVALUATE(PaymentJournal."Document No.", GetValueAtCell(RowNo, 3));

               EVALUATE(PaymentJournal."External Document No.", GetValueAtCell(RowNo, 4));

               EVALUATE(PaymentJournal."Account Type", GetValueAtCell(RowNo, 5));

               EVALUATE(PaymentJournal."Account No.", GetValueAtCell(RowNo, 6));

               EVALUATE(PaymentJournal."Description", GetValueAtCell(RowNo, 7));

               Evaluate(PaymentJournal."Amount (LCY)", GetValueAtCell(RowNo, 8));

               Evaluate(PaymentJournal."Bal. Account Type", GetValueAtCell(RowNo, 9));

               Evaluate(PaymentJournal."Bal. Account No.", GetValueAtCell(RowNo, 10));

               PaymentJournal.Validate("Amount (LCY)");

               PaymentJournal.Insert();

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 665 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 418 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans