Table

PurchLineForeignTradeCategory

Order line foreign trade category

Holds foreign trade details for purchase order lines, such as commodity, country or region of origin, unit weight and a French NGP code. The key is the line's lot ID plus its company. It links to the purchase order line.

Table name
PurchLineForeignTradeCategory
Module
Procurement and sourcing
Table group
WorksheetLine
Table type
Regular
Data per company
No
Configuration key
LogisticsBasic
Primary index
None
Replacement key
FK_PurchLine_PurchLineForeignTradeCat
Key fields
PurchLineInventTransId, PurchLineDataAreaId
Model
Foundation

Fields (15)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
PurchLineInventTransIdLot ID that identifies the purchase order line.String (20)
TradeInventTransId
YesPurchLine.InventTransIdNone
PurchLineDataAreaIdCompany of the purchase order line.String
DataAreaId
YesPurchLine.dataAreaIdNone
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoNone
IsDeletedYes/No flag marking the row as deleted for versioning.Enum
VersioningIsDeleted
NoYes (enum)
NoNone
IsModifiedYes/No flag marking the row as modified for versioning.Enum
VersioningIsModified
NoYes (enum)
NoNone
ItemCodeIdCommodity code for the line. The type name suggests it was an Intrastat code.String
DEL_IntrastatItemCodeId
NoNone
NGPCodesTable_FRNGP code assigned to the line, used for France. It is stored as a record ID.Int64
NGPCodesTableFRId
NoNGPCodesTable_FR.RecIdPurchPurchaseOrderLineV2EntityPurchPurchaseOrderLineEntity
OrigCountryRegionIdCountry or region the item comes from.String
ItemOrigCountryRegionId
NoNone
OrigStateIdState or province the item comes from.String
ItemOrigStateId
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoNone
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
UnitWeightWeight of one unit of the line item.Real
Weight
NoPurchPurchaseOrderLineV2EntityPurchPurchaseOrderLineEntity

Indexes (1)

Relations (2)

Each relation joins PurchLineForeignTradeCategory to another table on the fields shown.

  • NGPCodesTable_FR → NGPCodesTable_FR

    Join on NGPCodesTable_FR = NGPCodesTable_FR.RecId

    Many PurchLineForeignTradeCategory records → zero or one NGPCodesTable_FR record

  • PurchLine → PurchLine

    Join on PurchLineInventTransId = PurchLine.InventTransId, PurchLineDataAreaId = PurchLine.dataAreaId

    Zero or one PurchLineForeignTradeCategory record → exactly one PurchLine record

Get this data out

Tables are not exposed directly. These public entities read from PurchLineForeignTradeCategory; use one of them in Power BI, Power Platform or a data management project.

Need help with PurchLineForeignTradeCategory in a report, an integration or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk