Skip to main content

Notifications

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

How to post Output journal lines with Job Queue?

Posted on by 155

Hello, I tried to make a job queue that automatically posts the lines in the output journal. 

I think I have to use code unit 23 Item Journal Post Batch for thisJQ.JPG


But it gives an error in the log entries when executed: Record(472) is not compatible with Codeunit.Run(Record(83))

Do I need to give the job queue a certain parameter string? How should I format that string? 

Or do you need to program a complete new code unit?

Thank you in advance!

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: How to post Output journal lines with Job Queue?

    This is a feature for the general journal so perhaps taking the source code for that and swapping it for item journal is a worthwhile pursuit. If that is too long winded then create a report as you know that will generate all the lines for you and add this to the onaftergetrecord CODEUNIT.RUN(CODEUNIT::"Item Jnl.-Post",ItemJrnlLineVariable);

    If you do it with jus a codeunit then you have to build up the data in a loop and use the same line I’ve mentioned. This is a good resource for the report method: https://youtu.be/bTPWakN0Ue0

  • Suggested answer
    Bilal Haider Profile Picture
    Bilal Haider 45 on at
    RE: How to post Output journal lines with Job Queue?

    Hi,

    You need to create a new  code unit to post item journal using Job Queue just like we have for Sales and Purchases available out of the box.

  • Suggested answer
    Andy Sather Profile Picture
    Andy Sather on at
    RE: How to post Output journal lines with Job Queue?

    There was some discussion on this topic in our NAV forums a few years back.  You would need to create a custom extension to accomplish this.  Here is the thread:

    community.dynamics.com/.../392213

  • BrutusG Profile Picture
    BrutusG 155 on at
    RE: How to post Output journal lines with Job Queue?

    Thx for your reply. How do I give the right syntax in the parameter field for the Journal template name and batch..

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to post Output journal lines with Job Queue?

    Hello,

    I am not a programmer but some things to consider here:

    1. Journal Template Name = Name you setup for Output Journals

    2. Batch Name = Name you have setup for Output Batches

    I will defer to others on the community who are programmers to answer this.

    Thanks,

    Steve

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans