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 descriptionType / EDT / enumMandatoryReferencesIn public entities
SalesBasketIdUnique ID of the sales basket.String (20)
SalesBasketId
YesNone
ContactPersonIdContact person for the basket. Points to a contact record.String (20)
ContactPersonId
NoContactPerson.ContactPersonIdNone
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoNone
CurrencyCodeCurrency of the basket. Points to the currency table.String (3)
CustCurrencyCode
YesCurrency.CurrencyCodeNone
CustAccountCustomer account for the basket. Points to the customers table.String (20)
CustAccount
YesCustTable.AccountNumNone
CustomerRefReference text supplied by the customer.String (60)
CustRef
NoNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
DeliveryDateRequested ship date.Date
SalesShippingDateRequested
NoNone
DeliveryLocationDelivery location, as a system record ID that points to a location.Int64
LogisticsLocationRecId
NoLogisticsLocation.RecIdNone
DeliveryNameName of the delivery recipient.String (160)
CustName
NoNone
DiscPercentPercentage discount for the whole basket, taken from the order header.Real
SalesEndDiscPct
NoNone
ECPCustSignUpIdNumber linked to a customer sign-up. The metadata gives only a general number label.low confidenceString (20)
Num
NoNone
EndDiscTotal discount group of the basket.String
CustEndDiscCode
NoNone
GuestYes/No flag for a guest customer.Enum
NoYes (enum)
NoNone
InclTaxYes/No flag that shows whether prices include sales tax.Enum
InclTax
NoYes (enum)
NoNone
InternalExternalShows whether the basket is internal or external.Enum
InternalExternal (enum)
NoNone
InventLocationIdWarehouse for the basket. Points to the warehouses table.String
InventLocationId
NoInventLocation.InventLocationIdNone
InventSiteIdSite for the basket. Points to the site table.String
InventSiteId
NoInventSite.SiteIdNone
LineDiscLine discount group of the basket.String
CustLineDiscCode
NoNone
ManualEntryChangepolicySystem record ID of a price discount change policy for manual entry. The label is only 'Dummy'.low confidenceInt64
PriceDiscPolicyManual
NoPriceDiscChangePolicy.RecIdNone
ModifiedDateTimeThe date and time when the record was last changed. System field.UtcDateTime
ModifiedDateTime
NoNone
MultiLineDiscMultiline discount group of the basket.String
CustMultiLineDiscCode
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
PriceCalcDate used for price calculation.Date
CSSPriceCalcDate
NoNone
PriceGroupIdPrice group of the basket.String
CustPriceGroup
NoNone
PurchOrderFormNumCustomer's purchase order or requisition reference.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
SalesTypeType of order, such as sales order, returned order, subscription or journal.Enum
SalesType (enum)
NoNone
SessionIdID of the session that created the basket.Integer
SessionId
NoNone
SystemEntryChangePolicySystem record ID of a price discount change policy for system entry. The label is only 'Dummy'.low confidenceInt64
PriceDiscPolicySystem
NoPriceDiscChangePolicy.RecIdNone
SystemEntrySourceSource of the system-entered price or discount values. The label is only 'Dummy'.low confidenceEnum
PriceDiscSystemSource (enum)
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone
TouchCounter that records updates to the basket.low confidenceInteger
Counter
NoNone

Indexes (3)

Relations (14)

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

  • ContactPerson → ContactPerson

    Join on ContactPersonId = ContactPerson.ContactPersonId

    Many SalesBasket records → zero or one ContactPerson record

  • Currency → Currency

    Join on CurrencyCode = Currency.CurrencyCode

    Many SalesBasket records → exactly one Currency record

  • CustLineDiscountGroup → PriceDiscGroup

    Join on LineDisc = PriceDiscGroup.GroupId, PriceDiscGroup.Type = PriceGroupType::LineDiscGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust

    Many SalesBasket records → zero or one PriceDiscGroup record

  • CustMultiLineDiscountGroup → PriceDiscGroup

    Join on MultiLineDisc = PriceDiscGroup.GroupId, PriceDiscGroup.Type = PriceGroupType::MultiLineDiscGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust

    Many SalesBasket records → zero or one PriceDiscGroup record

  • CustPriceGroup → PriceDiscGroup

    Join on PriceGroupId = PriceDiscGroup.GroupId, PriceDiscGroup.Type = PriceGroupType::PriceGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust

    Many SalesBasket records → zero or one PriceDiscGroup record

  • CustTable → CustTable

    Join on CustAccount = CustTable.AccountNum

    Many SalesBasket records → exactly one CustTable record

  • CustTotalDiscountGroup → PriceDiscGroup

    Join on EndDisc = PriceDiscGroup.GroupId, PriceDiscGroup.Type = PriceGroupType::EndDiscGroup, PriceDiscGroup.Module = ModuleInventCustVend::Cust

    Many SalesBasket records → zero or one PriceDiscGroup record

  • CustTransOpen → CustTransOpen

    Join on CustAccount = CustTransOpen.AccountNum

    Cardinality not set in the metadata.

  • DeliveryLocation_FK → LogisticsLocation

    Join on DeliveryLocation = LogisticsLocation.RecId

    Many SalesBasket records → zero or one LogisticsLocation record

  • InventLocation → InventLocation

    Join on InventLocationId = InventLocation.InventLocationId

    Many SalesBasket records → zero or one InventLocation record

  • InventSite → InventSite

    Join on InventSiteId = InventSite.SiteId

    Many SalesBasket records → zero or one InventSite record

  • PriceDiscChangePolicyRecId1 → PriceDiscChangePolicy

    Join on SystemEntryChangePolicy = PriceDiscChangePolicy.RecId

    Many SalesBasket records → zero or one PriceDiscChangePolicy record

  • PriceDiscChangePolicyRecId2 → PriceDiscChangePolicy

    Join on ManualEntryChangepolicy = PriceDiscChangePolicy.RecId

    Many SalesBasket records → zero or one PriceDiscChangePolicy record

  • SalesTable → SalesTable

    Join on CustAccount = SalesTable.CustAccount

    Cardinality 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.

Email sales@drdynamics.co.uk