Table

SalesLineForeignTradeCategory

Order line foreign trade category

Holds foreign trade details for a sales order line, such as commodity code, origin and unit weight. It is keyed by the line's lot ID and company. It includes an NGP code field used for France.

Table name
SalesLineForeignTradeCategory
Module
Sales and marketing
Table group
WorksheetLine
Table type
Regular
Data per company
No
Configuration key
LogisticsBasic
Primary index
None
Replacement key
FK_SalesLine_SalesLineForeignTradeCat
Key fields
salesLineInventTransId, salesLineDataAreaId
Model
Foundation

Fields (13)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
salesLineInventTransIdLot ID of the sales order line that these details belong to.String (20)
TradeInventTransId
YesSalesLine.InventTransIdNone
salesLineDataAreaIdCompany of the sales order line that these details belong to.String
DataAreaId
YesSalesLine.dataAreaIdNone
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoNone
ItemCodeIdCommodity code for the item on the line, used in foreign trade reporting.String
DEL_IntrastatItemCodeId
NoNone
NGPCodesTable_FRPoints to an NGP code record, used for France.Int64
NGPCodesTableFRId
NoNGPCodesTable_FR.RecIdSalesOrderLineV3EntitySalesOrderLineV2Entity
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 item on the line.Real
Weight
NoNone

Indexes (1)

Relations (2)

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

  • NGPCodesTable_FR → NGPCodesTable_FR

    Join on NGPCodesTable_FR = NGPCodesTable_FR.RecId

    Many SalesLineForeignTradeCategory records → zero or one NGPCodesTable_FR record

  • SalesLine → SalesLine

    Join on salesLineInventTransId = SalesLine.InventTransId, salesLineDataAreaId = SalesLine.dataAreaId

    Zero or one SalesLineForeignTradeCategory record → exactly one SalesLine record

Get this data out

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

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

Email sales@drdynamics.co.uk