Code Unit for posted Purchase Invoice

Hi Everyone,

I need your help. Could you guide me if what particular code unit should I update.

I add one text field in purchase line table and I need to see also the record in posted tables such as purchase invoice line, G/L Entry, Value Entry, VAT Entry, and Vendor ledger Entry.

Is this possible?

Thank you in advance, your help is much appreciated.

Yes…it is possible…

What did you try as of now?

Did you search for how existing fields are flowing?

Thank you for the reply.

As of now I added new identical field ID No./Name in purchase line table, posted purch. inv. line table, G/L Entry, Value Entry, VAT Entry, Item Ledger Entry, and Vendor ledger Entry.

The successful update is only the posted purch. inv. line table, but upon navigating the posted invoice, G/L Entry, Value Entry, VAT Entry, Item Ledger Entry, and Vendor ledger Entry is not updated with the posted data.

I also try to added the code in the code unit 90 Purch.-Post, but I’m not that sure if it is the right code unit/section to update.

Is there any code unit to that still need to update? What are those code unit ID/Name?

Hope to hear the solution from you the soonest and thank you in advance. [:)]

Use codecoverage and debug the code where G/L Entry, Value Entry, VAT Entry, Item Ledger Entry, and Vendor ledger Entry tables are inserted…

Check CU 90,12 and 22

Hi,

Navision always updated posting entries from journal to ledger.

Now you have added one field in Purchase Line table .Add the same field with same id in Purchase invoice line and in Item Journal Table,General Journal Table

For updating record you need modify CU 90,21,12 by finding the Functions in codeunit.

I hope This will help you.

You already managed to get Posted Purch. Inv. Line updated. To bring your field to G/L Entry, Vendor Ledger Entry and VAT Entry you need to add the same field to table 81 (Gen. Journal Line), then look at codeunit 90 and try to find where fields of Gen. Journal Line (which in codeunit 90 is named GenJnlLine) are filled and add your line there; after that go to codeunit 12 and look for the code that moves fields from Gen. Journal Line to G/L Entry, VAT Entry, etc…

To update Value Entry and, if needed, Item Ledger Entry the way to go through is similar, but you need to add your field to table 83 (Item Journal Line), find in codeunit 90 the where Item Journal Line is filled (look for ItemJnlLine) and then go to codeunit 22 end find the code that moves fields from Item Journal Line to Value Entry, etc…

You need to add them all the tables, update codeunit 90 and then update codeunit 10201.

Also recommend adding the field to the Gen. Journal Line table

I think that’s a NA Localization.

Yes my bad. This codeunit only applies in the us

Hi Guys,

I really thankful for your help. It’s now working on my current database. Thank you so much. [:)]

Welcome [:)]