Purchase Invoice Line Entry Type

Hi Guys,

using the CRONUS database, Dynamics NAV 2009 for posting lines in the Purchase Invoice Page you have 4 choices for posting lines:

Fixed Asset


Charge Item

G/L Account

Each has a Type in the Purchase Line table as a number i.e. Fixed Asset = 4, Item = 2, Charge Item = 5 and so on. I am importing XML into the system and need to know this type beforehand in order that it is imported correctly, is there anywhere else in the system that will tell me what the Type number is so I can look it up before populating the XML?

Thanks in advance.

Just want to be celar on requirement before suggesting idea…

so while importing XML file to Purchase Lines, you want to know the Type of Line based on the No.?

Does your XML file contains Type option also?

One easy way to get the number is to create an integer variable and set its value to the option field. So MyInteger := MyOption.

The Purchase Line table has a field in it called Type. This is a number which relates to the type of line, so if it was 4, the drop down in the RTC is Fixed Asset.

My external program is populating various elements of the XML file before is imported.

In order so that I can successfully post the imported invoice XML data, it needs to have the Type number populated, all I need to know is where in the CRONUS database does it tell you that Fixed Asset corresponds to the number 4 or Item corrsponds to 2 and so on.

This is more of a SQL question than a NAV question I think, just to be 100% clear I in no way want to have to edit the contents of the XML file once it’s reached NAV so I’m not sure creating an integer variable can help me. I’ll try and explain again …

The Purc_ Inv_ Line table contains

Type No_ Description

4 FA000010 Mercedes 300

2 700010 Wooden Door

And so on…

Other than the Purch_ Inv_ Line table, is there another table that contains these fields / anywhere else I can get this information in order to populate the XML file to be uploaded.

i.e. is there a table that tells Dynamics that FA000010 is an Fixed Asset because it has a Type of 4?

There is not a table. The numbers are assigned in order based on the OptionString property of the field. The No. field on the line is then setup with a conditional TableRelation property based on that type, which tells it what table to go look at.

If you look at Type Field Properties, OptionString… we will have ,G/L Account,Item,Fixed Asset,Charge (Item)

which means

0 Blank

1 G/L Account

2 Item

4 Fixed Asset

5 Charge (Item)

Thanks guys but I’ve sorted it, by typing that out led to me answering my own question [I] lol