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 description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
SalesNumberSequenceID of the sales agreement. | String (20)SalesAgreementId | Yes | SalesAgreementHeaderEntityCFMSalesAgreementPaymentOrderEntityRetailSalesAgreementFulfillmentEntityand 5 more | |
SellingLegalEntityLegal entity that sells under the agreement. | Int64RefRecId | No | CompanyInfo.RecId | SalesAgreementHeaderEntity |
CustAccountCustomer account that the agreement is for. | String (20)CustAccount | Yes | CustTable.AccountNum | SalesAgreementHeaderEntitySalesAgreementLineEntity |
CustomerDataAreaIdCompany that holds the customer account. | StringDataAreaId | No | CustTable.dataAreaId | None |
InstanceRelationTypeShows which table in a table inheritance hierarchy the record belongs to. System field. | Int64RelationType | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | None | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
SubBillBillingScheduleNumberNumber of the billing schedule linked to the agreement. | String (20)SubBillBillingScheduleNumber | No | SubBillScheduleTable.SubBillBillingScheduleNumber | None |
SubBillScheduleDataAreaIdCompany that holds the billing schedule. | StringDataAreaId | No | SubBillScheduleTable.DataAreaId | None |
SysRowVersionA system row version number that is used for change tracking. System field. | Int64SysRowVersion | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None |
Indexes (4)
CompanyInfoIdxNot unique.
CustTableIdxCustAccount,CustomerDataAreaIdNot unique.
SalesNumberSequenceSellingPartyIdxReplacement keySalesNumberSequence,SellingLegalEntityUnique, alternate key.
BillingScheduleTableSubBillBillingScheduleNumber,SubBillScheduleDataAreaIdNot unique.
Relations (4)
Each relation joins SalesAgreementHeader to another table on the fields shown.
AgreementHeaderSales→AgreementHeaderJoin on
RecId = AgreementHeader.RecIdZero or one SalesAgreementHeader record → exactly one AgreementHeader record
CustTable→CustTableJoin on
CustomerDataAreaId = CustTable.dataAreaId,CustAccount = CustTable.AccountNumMany SalesAgreementHeader records → exactly one CustTable record
SellingLegalEntity→CompanyInfoJoin on
SellingLegalEntity = CompanyInfo.RecIdMany SalesAgreementHeader records → exactly one CompanyInfo record
BillingScheduleTable→SubBillScheduleTableJoin on
SubBillBillingScheduleNumber = SubBillScheduleTable.SubBillBillingScheduleNumber,SubBillScheduleDataAreaId = SubBillScheduleTable.DataAreaIdMany 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.
SalesAgreementHeaderEntity· 3 fields from this tableCFMSalesAgreementPaymentOrderEntity· 1 field from this tablePurchCommitmentLineEntity· 0 fields from this tableRetailSalesAgreementFulfillmentEntity· 1 field from this tableRetailSalesAgreementSalesTransEntity· 1 field from this tableSalesAgreementLineEntity· 2 fields from this tableSubBillScheduleTableEntity· 1 field from this tablePurchPurchaseAgreementConfirmationLineEntity· 0 fields from this tableSalesAgreementConfirmationLineEntity· 0 fields from this tableSalesAgreementLineNoteEntity· 1 field from this tableSalesAgreementLineFulfillmentEntity· 1 field from this table
Need help with SalesAgreementHeader in a report, an integration or a migration? Talk to Dr Dynamics.