Table

SalesAgreementHeader

Sales agreement

Holds the header of a sales agreement. It is keyed by the agreement ID and the selling legal entity. It links to a customer account, the selling company and a billing schedule.

Table name
SalesAgreementHeader
Module
Sales and marketing
Table group
WorksheetHeader
Table type
Regular
Data per company
No
Configuration key
TradeBlanketOrder
Primary index
None
Replacement key
SalesNumberSequenceSellingPartyIdx
Key fields
SalesNumberSequence, SellingLegalEntity
Model
Foundation
Extends
AgreementHeader

Fields (12)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
SalesNumberSequenceID of the sales agreement.String (20)
SalesAgreementId
YesSalesAgreementHeaderEntityCFMSalesAgreementPaymentOrderEntityRetailSalesAgreementFulfillmentEntityand 5 more
SellingLegalEntityLegal entity that sells under the agreement.Int64
RefRecId
NoCompanyInfo.RecIdSalesAgreementHeaderEntity
CustAccountCustomer account that the agreement is for.String (20)
CustAccount
YesCustTable.AccountNumSalesAgreementHeaderEntitySalesAgreementLineEntity
CustomerDataAreaIdCompany that holds the customer account.String
DataAreaId
NoCustTable.dataAreaIdNone
InstanceRelationTypeShows which table in a table inheritance hierarchy the record belongs to. System field.Int64
RelationType
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
SubBillBillingScheduleNumberNumber of the billing schedule linked to the agreement.String (20)
SubBillBillingScheduleNumber
NoSubBillScheduleTable.SubBillBillingScheduleNumberNone
SubBillScheduleDataAreaIdCompany that holds the billing schedule.String
DataAreaId
NoSubBillScheduleTable.DataAreaIdNone
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 (4)

Relations (4)

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

  • AgreementHeaderSales → AgreementHeader

    Join on RecId = AgreementHeader.RecId

    Zero or one SalesAgreementHeader record → exactly one AgreementHeader record

  • CustTable → CustTable

    Join on CustomerDataAreaId = CustTable.dataAreaId, CustAccount = CustTable.AccountNum

    Many SalesAgreementHeader records → exactly one CustTable record

  • SellingLegalEntity → CompanyInfo

    Join on SellingLegalEntity = CompanyInfo.RecId

    Many SalesAgreementHeader records → exactly one CompanyInfo record

  • BillingScheduleTable → SubBillScheduleTable

    Join on SubBillBillingScheduleNumber = SubBillScheduleTable.SubBillBillingScheduleNumber, SubBillScheduleDataAreaId = SubBillScheduleTable.DataAreaId

    Many SalesAgreementHeader records → exactly one SubBillScheduleTable record

Get this data out

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

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

Email sales@drdynamics.co.uk