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

Warehouse Item Journal field "Reason Code" does not update onto the Item Journal Line

(0) ShareShare
ReportReport
Posted on by

Does anyone know why the Reason Code does not update from the Warehouse Entry to the Item Journal line when then Calculate Whse. Adjustment function is run. 

I have checked the report #7315 and there is no coding to insert the Reason Code field.  Is this by design of just an omission.

Our objective is to ensure that the Reason Code is transferred from the processing of a Warehouse Item Journal through to the Value Entries and ultimately to the General Ledger.

thanks

Glenda

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,216 Super User 2026 Season 1 on at

    its by design.

    You can customize if you want to flow.

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

    Hi Glenda,

    yes, there is no code for this in Report 7315, looks like an omission. But I'm afraid you need to check the whole chain "Item Journal" -> "Value Entry" -> "General Journal" to make sure this works.

    with best regards

    Jens

  • Community Member Profile Picture
    on at

    Hi Jens,

    thanks for the information, and yes the whole chain from 'Item Journal" through to the General Journal is working fine.  I have tried to modify the report to include the Whse Entry "Reason Code" on Insert but must be missing something.  Any suggestions would be appreciated.

    Thanks

    Glenda

  • Suggested answer
    Suresh Kulla Profile Picture
    50,278 Super User 2026 Season 1 on at

    Glenda,

    To transfer the reason code, first add the Reason Code field in the Bin Content Buffer table  and assign that value in the report 7315 in the Integer - OnAfterGetRecord, then you have to modify the function InsertItemJnlLine function to add additional parameter to transfer reason code and then in the function assign the value.

    I have tested this and it successfully transfer the reason code from warehouse entry to item journal line.

    You can download the report from the following link

    http://1drv.ms/1OGITNh

  • Community Member Profile Picture
    on at

    Hi Suresh

    Thanks for the details, I have followed your notes but am still not getting the reason code to populate through to the item journal line.

    I Added the Reason Code field to the Bin Content Buffer Table

    - Enabled Field No. Field Name Data Type Length Description

      Yes 50000 Reason Code Code       10

    - There is no TableRelation in the Properties

    The Report is modified as per the downloaded report link.

    Not sure what I am missing.

    Regards

    Glenda Jones

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

    Hi Glenda, hi, Suresh,

    I had a quick look at the example modification. Looks a little incomplete to me... To have the right reason code for the adjustments from the warehouse entries, the adjustments also need to be calculated by reason code. And they need to be kept seperately in the Bin Content Buffer, and to be filtered by on every occasion where the Bin Content Buffer is filtered.

    To keep the Bin Content Buffer by reason code, you need to add the field to the primary key of the table. This can have some side effects, though. As for the filtering... well, seems a little more complicated. You would need to go over the warehouse entries (WhseEntry2, WhseEntry3) by reason code, too. And there appears to be logic that counts the existing adjustment journal batch (with the same batch name) into this, via reservation entries. They just can't be right from the start, should be empty at first run. Also, the OnPostDataItem code is where new item journal lines are created, by location, variant, and unit of measure. They also need to be created by reason code.

    Not sure if that's all... ;)

    with best regards

    Jens

  • Pborg Profile Picture
    10 on at

    Wow an old issue and still extremely relevant.

    And with BC and Extensions (AL) this has got much worse to "extend". Still report #7315 is in play but the Query used in the buffering operation cannot be extended with a reason column nor can we add reason to the key.

    The available events OnAfterGetRecordItemOnAfterSNLotNumbersByBinSetFilters and OnBeforeAdjmtBinQuantityBufferInsert cannot be used.

    I wonder if anyone have considered lifting this to a feature request.  

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans