Table

CustInvoiceSalesLink

Customer invoice - sales order relation table

Relation table that connects customer invoices to the sales orders they cover. The key combines the original sales order, invoice date, invoice ID, Brazilian fiscal establishment and sales order. It also keeps customer, name and address details for the invoice and delivery.

Table name
CustInvoiceSalesLink
Module
Accounts receivable
Table group
Transaction
Table type
Regular
Data per company
Yes
Configuration key
LogisticsBasic
Primary index
RecId
Replacement key
origSalesIdx
Key fields
origSalesId, invoiceDate, invoiceId, FiscalEstablishment_BR, salesId
Model
Foundation

Fields (20)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
origSalesIdOriginal sales order the invoice came from.String (20)
SalesIdOrig
NoSalesTable.SalesIdNone
invoiceDateDate of the customer invoice.Date
TransDate
YesNone
invoiceIdIdentifier of the customer invoice.String (50)
InvoiceId
YesNone
FiscalEstablishment_BRFiscal establishment record used for Brazil.Int64
FiscalEstablishmentRecId_BR
NoFiscalEstablishment_BR.RecIdNone
salesIdSales order linked to the invoice.String (20)
SalesIdBase
YesSalesTable.SalesIdNone
CustomerRefCustomer's own reference text.String (60)
CustRef
NoNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
deliveryNameName of the party receiving the delivery.String (160)
CustName
NoNone
DeliveryPostalAddressDelivery address, pointing to an address record.Int64
LogisticsPostalAddressRecId
NoLogisticsPostalAddress.RecIdNone
invoiceAccountCustomer account that is invoiced.String (20)
CustInvoiceAccount
NoCustTable.AccountNumNone
InvoicePostalAddressInvoice address, pointing to an address record.Int64
LogisticsPostalAddressRecId
NoLogisticsPostalAddress.RecIdNone
invoicingNameName of the invoiced party.String (160)
CustName
NoNone
orderAccountCustomer account that placed the order.String (20)
CustAccount
NoCustTable.AccountNumNone
parmIdIdentifier of the parameter set, as a text value.low confidenceString (20)
ParmId
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
PurchaseOrderCustomer's purchase order or requisition number.String (20)
CustPurchaseOrder
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

Indexes (6)

Relations (8)

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

  • CustInvoiceJour → CustInvoiceJour

    Join on salesId = CustInvoiceJour.SalesId, invoiceId = CustInvoiceJour.InvoiceId, invoiceDate = CustInvoiceJour.InvoiceDate

    Many CustInvoiceSalesLink records → exactly one CustInvoiceJour record

  • CustTable → CustTable

    Join on invoiceAccount = CustTable.AccountNum

    Many CustInvoiceSalesLink records → zero or one CustTable record

  • CustTable_orderAccount → CustTable

    Join on orderAccount = CustTable.AccountNum

    Many CustInvoiceSalesLink records → zero or one CustTable record

  • DeliveryPostalAddress_FK → LogisticsPostalAddress

    Join on DeliveryPostalAddress = LogisticsPostalAddress.RecId

    Many CustInvoiceSalesLink records → zero or one LogisticsPostalAddress record

  • FiscalEstablishment_BR → FiscalEstablishment_BR

    Join on FiscalEstablishment_BR = FiscalEstablishment_BR.RecId

    Many CustInvoiceSalesLink records → zero or one FiscalEstablishment_BR record

  • InvoicePostalAddress_FK → LogisticsPostalAddress

    Join on InvoicePostalAddress = LogisticsPostalAddress.RecId

    Many CustInvoiceSalesLink records → zero or one LogisticsPostalAddress record

  • salesTable → SalesTable

    Join on origSalesId = SalesTable.SalesId

    Many CustInvoiceSalesLink records → zero or one SalesTable record

  • SalesTable_salesId → SalesTable

    Join on salesId = SalesTable.SalesId

    Many CustInvoiceSalesLink records → exactly one SalesTable record

Get this data out

No public entity reads from CustInvoiceSalesLink. Its data is only reachable through the application, a custom entity or a database export.

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

Email sales@drdynamics.co.uk