How to bring the reason code from Item journal page to G/L entry?

Hi Expert.


if we can customize such requirement ?

Bring the reason code from Item Journal page (post) to G/L ENTRY (17) ?


I checked the code long time, but can't understand.

any suggestion will be apprecaited.


my version is NAVISION 2016

  • Hi Gary,
    The reason code is already posted on the value entry. So you need to bring it the last way.

    You would have to add reason code to the Invt. Posting Buffer table. And then you need to update codeunit 5802 to transfer the field to the Gen. Journal Line, where it then will get to the G/L Entry.
    This may sound quite easy, but it is not. When yo want to add another field to this flow, then you have to change the logic which today make sure you have as few g/l entries as required. A new field is like a new dimension.

    The best way to figure out what it's doing would be to set a breakpoint on the BufferInvtPosting function and run the debugger from there. That will show you how it works. Smile
  • In reply to Erik P. Ernst:

    Hi Erik. I will try. Thanks for your anwser. Have a great day.
  • In reply to Erik P. Ernst:

    HI Erik. I have done it. thank you very much.
  • In reply to Gary:

    Sounds good. I hope you used Event's as opposed to change the codeunit's directly.