Table
SalesBasket
Sales basket
Header record for a sales basket, keyed by sales basket ID. It holds customer, currency, delivery, warehouse and site details. It also holds price group, discount group and tax setting. Sales basket lines link to it.
- Table name
SalesBasket- Module
Sales and marketing- Table group
WorksheetHeader- Table type
Regular- Data per company
Yes- Configuration key
LogisticsBasic- Primary index
SalesBasketIdx- Replacement key
SalesBasketIdx- Key fields
SalesBasketId- Model
Foundation
Fields (34)
| Field and description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
SalesBasketIdUnique ID of the sales basket. | String (20)SalesBasketId | Yes | None | |
ContactPersonIdContact person for the basket. Points to a contact record. | String (20)ContactPersonId | No | ContactPerson.ContactPersonId | None |
CreatedDateTimeThe date and time when the record was created. System field. | UtcDateTimeCreatedDateTime | No | None | |
CurrencyCodeCurrency of the basket. Points to the currency table. | String (3)CustCurrencyCode | Yes | Currency.CurrencyCode | None |
CustAccountCustomer account for the basket. Points to the customers table. | String (20)CustAccount | Yes | CustTable.AccountNum | None |
CustomerRefReference text supplied by the customer. | String (60)CustRef | No | None | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
DeliveryDateRequested ship date. | DateSalesShippingDateRequested | No | None | |
DeliveryLocationDelivery location, as a system record ID that points to a location. | Int64LogisticsLocationRecId | No | LogisticsLocation.RecId | None |
DeliveryNameName of the delivery recipient. | String (160)CustName | No | None | |
DiscPercentPercentage discount for the whole basket, taken from the order header. | RealSalesEndDiscPct | No | None | |
ECPCustSignUpIdNumber linked to a customer sign-up. The metadata gives only a general number label.low confidence | String (20)Num | No | None | |
EndDiscTotal discount group of the basket. | StringCustEndDiscCode | No | None | |
GuestYes/No flag for a guest customer. | EnumNoYes (enum) | No | None | |
InclTaxYes/No flag that shows whether prices include sales tax. | EnumInclTaxNoYes (enum) | No | None | |
InternalExternalShows whether the basket is internal or external. | EnumInternalExternal (enum) | No | None | |
InventLocationIdWarehouse for the basket. Points to the warehouses table. | StringInventLocationId | No | InventLocation.InventLocationId | None |
InventSiteIdSite for the basket. Points to the site table. | StringInventSiteId | No | InventSite.SiteId | None |
LineDiscLine discount group of the basket. | StringCustLineDiscCode | No | None | |
ManualEntryChangepolicySystem record ID of a price discount change policy for manual entry. The label is only 'Dummy'.low confidence | Int64PriceDiscPolicyManual | No | PriceDiscChangePolicy.RecId | None |
ModifiedDateTimeThe date and time when the record was last changed. System field. | UtcDateTimeModifiedDateTime | No | None | |
MultiLineDiscMultiline discount group of the basket. | StringCustMultiLineDiscCode | No | None | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
PriceCalcDate used for price calculation. | DateCSSPriceCalcDate | No | None | |
PriceGroupIdPrice group of the basket. | StringCustPriceGroup | No | None | |
PurchOrderFormNumCustomer's purchase order or requisition reference. | String (20)CustPurchaseOrder | 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 | |
SalesTypeType of order, such as sales order, returned order, subscription or journal. | EnumSalesType (enum) | No | None | |
SessionIdID of the session that created the basket. | IntegerSessionId | No | None | |
SystemEntryChangePolicySystem record ID of a price discount change policy for system entry. The label is only 'Dummy'.low confidence | Int64PriceDiscPolicySystem | No | PriceDiscChangePolicy.RecId | None |
SystemEntrySourceSource of the system-entered price or discount values. The label is only 'Dummy'.low confidence | EnumPriceDiscSystemSource (enum) | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None | |
TouchCounter that records updates to the basket.low confidence | IntegerCounter | No | None |
Indexes (3)
SalesBasketIdxPrimary indexReplacement keyUnique, alternate key.
CustContactIdxNot unique.
SessionIdxNot unique.
Relations (14)
Each relation joins SalesBasket to another table on the fields shown.
ContactPerson→ContactPersonJoin on
ContactPersonId = ContactPerson.ContactPersonIdMany SalesBasket records → zero or one ContactPerson record
Currency→CurrencyJoin on
CurrencyCode = Currency.CurrencyCodeMany SalesBasket records → exactly one Currency record
CustLineDiscountGroup→PriceDiscGroupJoin on
LineDisc = PriceDiscGroup.GroupId,PriceDiscGroup.Type = PriceGroupType::LineDiscGroup,PriceDiscGroup.Module = ModuleInventCustVend::CustMany SalesBasket records → zero or one PriceDiscGroup record
CustMultiLineDiscountGroup→PriceDiscGroupJoin on
MultiLineDisc = PriceDiscGroup.GroupId,PriceDiscGroup.Type = PriceGroupType::MultiLineDiscGroup,PriceDiscGroup.Module = ModuleInventCustVend::CustMany SalesBasket records → zero or one PriceDiscGroup record
CustPriceGroup→PriceDiscGroupJoin on
PriceGroupId = PriceDiscGroup.GroupId,PriceDiscGroup.Type = PriceGroupType::PriceGroup,PriceDiscGroup.Module = ModuleInventCustVend::CustMany SalesBasket records → zero or one PriceDiscGroup record
CustTable→CustTableJoin on
CustAccount = CustTable.AccountNumMany SalesBasket records → exactly one CustTable record
CustTotalDiscountGroup→PriceDiscGroupJoin on
EndDisc = PriceDiscGroup.GroupId,PriceDiscGroup.Type = PriceGroupType::EndDiscGroup,PriceDiscGroup.Module = ModuleInventCustVend::CustMany SalesBasket records → zero or one PriceDiscGroup record
CustTransOpen→CustTransOpenJoin on
CustAccount = CustTransOpen.AccountNumCardinality not set in the metadata.
DeliveryLocation_FK→LogisticsLocationJoin on
DeliveryLocation = LogisticsLocation.RecIdMany SalesBasket records → zero or one LogisticsLocation record
InventLocation→InventLocationJoin on
InventLocationId = InventLocation.InventLocationIdMany SalesBasket records → zero or one InventLocation record
InventSite→InventSiteJoin on
InventSiteId = InventSite.SiteIdMany SalesBasket records → zero or one InventSite record
PriceDiscChangePolicyRecId1→PriceDiscChangePolicyJoin on
SystemEntryChangePolicy = PriceDiscChangePolicy.RecIdMany SalesBasket records → zero or one PriceDiscChangePolicy record
PriceDiscChangePolicyRecId2→PriceDiscChangePolicyJoin on
ManualEntryChangepolicy = PriceDiscChangePolicy.RecIdMany SalesBasket records → zero or one PriceDiscChangePolicy record
SalesTable→SalesTableJoin on
CustAccount = SalesTable.CustAccountCardinality not set in the metadata.
Get this data out
No public entity reads from SalesBasket. Its data is only reachable through the application, a custom entity or a database export.
Need help with SalesBasket in a report, an integration or a migration? Talk to Dr Dynamics.