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 :
Microsoft Dynamics NAV (Archived)

Item Journal not Post with Different Batch

(0) ShareShare
ReportReport
Posted on by

Hi,

in my customization I inserted item journal lines & Post that lines. in this case 4 lines are same batch & Template and 1 line has a different Batch & Template so when I post these lines using code 4 lines are posted but the line with different batch & Template name has not been posted.

is there any suggestion on this?

 

Ravi Shah

 

 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Jens Glathe Profile Picture
    6,092 on at

    Hi Ravi,

    this is how NAV works... ;) No joking. The posting routine you're invoking is CU23 "Item Jnl.-Post Batch"... this is only posting one batch, filtering one template name and one batch name... and doing a commit in the end. When you create lines for different batches, you would need to post them in two transactions. However, it is not a good idea to modify CU23 to post several batches in one transaction - you would get nly one register for them, then. In the register there is a field for the batch name. What is the intent of the separate line in a different batch?


    with best regards

    Jens

  • Community Member Profile Picture
    on at

    Hi Jens,

    Thanks for reply.

    This customization is used at the time of QC posting which is our add on. in this accepted qty is goes into accepted location and Rejected Quantity goes into Rejected location and for rejected entries there is a separate batch. I already done two separate execution for separate batch but in this scenario if there is error in second batch then first batch is posted so I just want to know that is there any way to execute both batches lines in one transaction?

    Ravi Shah

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    Without using a two separate batches, why don't you use a flag to mark the separate entries. As Jens mention in his post, after one batch is posted NAV execute the COMMIT command, Once it has been done there is no turning back from that.

    So without changing the CU23 best way is to change your logic.

    This is my personal idea and there may be other methods as well.

    If you have any query please do revert us back.

  • Community Member Profile Picture
    on at

    Actually I was not thinking to change CU 23. my Problem is that COMMIT command but I think if I am using different batch then should go for batch wise different Transaction.

    Thanks for your suggestion

    Ravi Shah

  • Suggested answer
    Community Member Profile Picture
    on at

    For QC why cant you use the location differently instead of batches

  • Community Member Profile Picture
    on at

    Location is already different.

  • Suggested answer
    Community Member Profile Picture
    on at

    Why you created two different batches

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    This was OK if your batch entries does not depend on other batch entries. As in if you want to reverse the entries in the first batch if the second batch entries does not get posted due to some data error.  In that case you will end up in a problem.

  • Suggested answer
    Jens Glathe Profile Picture
    6,092 on at

    Hi Ravi,

    to link these two batches, if that's necessary, you have to meddle with CU23 or something like that. How about using the idea from Tharanga, for example Reason Code in the journal lines, all in one batch as is NAV default behaviour? You could easily identify the rejects this way. Also, you can use a different document no. (I wouldn't).

    with best regards

    Jens

  • Suggested answer
    Tharanga Chandrasekara Profile Picture
    23,118 on at

    Agreed with Jens.  Use Reason code or separate document no. ( will not be able to use different posting no.).

    With the use of reason code you will be able to identify this entries separately.

    My idea is not to interrupt the posting code units unless you really have to do.

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 > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans