Insert transaction to table G/L

Hi Everybody,

I have a problem need everyone support. On table G/L Entry I create 1 field (Transaction)

I want insert field “Transaction Type” on table Sales Header to table G/L Entry with field (Transaction) was created previously.

Please help me solution.

Thanks so much

Not sure what version of NAV you are using but you will first have to create the Transaction field in Gen. Journal line table, next in codeunit 80 search for the text // Post sales and VAT to G/L entries from posting buffer, in here put the code
Genjnlline.transaction := Transaction type;
Then go to Codeunit 12 and search for Glentry.init; in there put the code Glentry.transaction := genjnlline.transaction.

Thanks you sbhatbng.

I’m using NAV version 2013.

Hi sbhatbng,

I checked but it’s not work.

Field “Transaction Type” in table Sales Header (ID 36) I need insert “Transaction Type” to table G/L Entry with Transaction.


Hi Dinhson,
Did you do what sbhatbng suggested? Then you need one more step. You need to copy it from sales header to gen. journal lines, before you can copy it to g/l entry table. That’s done in codeunit 80.

All the steps you need to take to make a field from sales order post to the g/l entry table is:

  1. Create your field in Sales Header Table (Transaction Type)
  2. Create same field in both general journal line and g/l entry table.
  3. In codeunit 80, where gen.journal line is initiated with the values from the sales header: Add your field like Transaction := SalesHeader.“Transaction Type”
  4. In codeunit 12, where it initiates the values in G/L Entry table from the Gen. Journal lines.

Thanks you Erik P. Ernst

You’re welcome. You may also benefit from reading this blog post:…/how-to-become-a-great-microsoft-dynamics-nav-developer-which-tables-to-use

Hi Erik

When posting then on line Tax Due Direct Cost not insert Code “Transaction Type” .
Then lines with Description Invoice SO-0001 then insert. I need insert code to where on CodeUnit.

Please help me. Thanks so much.