Table "Sales Header Archive"
Stores archived versions of sales document headers for historical reference and audit trails.
Properties
| Name | Value |
|---|---|
| Caption | Sales Header Archive |
| DataCaptionFields | 3,79,5047 |
| DrillDownPageID | Page Microsoft.Sales.Archive."Sales List Archive" |
| LookupPageID | Page Microsoft.Sales.Archive."Sales List Archive" |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "Document Type" | Enum Microsoft.Sales.Document."Sales Document Type" | Specifies the type of the archived sales document, such as quote, order, invoice, or credit memo. |
| "Sell-to Customer No." | Code[20] | Specifies the customer who will receive the products and be billed by default for this archived sales document. |
| "No." | Code[20] | Specifies the unique identifier for the archived sales document. |
| "Bill-to Customer No." | Code[20] | Specifies the customer to whom the invoice or credit memo was sent for this archived sales document. |
| "Bill-to Name" | Text[100] | Specifies the name of the customer to whom the invoice or credit memo was sent. |
| "Bill-to Name 2" | Text[50] | Specifies additional name information for the billing customer when the full name cannot fit in the primary field. |
| "Bill-to Address" | Text[100] | Specifies the street address of the customer to whom the invoice was sent. |
| "Bill-to Address 2" | Text[50] | Specifies additional address information for the billing customer when the full address cannot fit in the primary field. |
| "Bill-to City" | Text[30] | Specifies the city of the customer's billing address. |
| "Bill-to Contact" | Text[100] | Specifies the name of the contact person at the customer's billing address. |
| "Your Reference" | Text[35] | Specifies the customer's own reference number for this transaction, typically used for purchase order numbers. |
| "Ship-to Code" | Code[10] | Specifies the code for an alternate shipping address when products should be delivered to a different location than the customer's main address. |
| "Ship-to Name" | Text[100] | Specifies the name of the recipient at the shipping address. |
| "Ship-to Name 2" | Text[50] | Specifies additional name information for the shipping recipient when the full name cannot fit in the primary field. |
| "Ship-to Address" | Text[100] | Specifies the street address where the items are shipped to. |
| "Ship-to Address 2" | Text[50] | Specifies additional address information for the shipping destination when the full address cannot fit in the primary field. |
| "Ship-to City" | Text[30] | Specifies the city of the shipping destination address. |
| "Ship-to Contact" | Text[100] | Specifies the name of the contact person at the shipping destination address. |
| "Order Date" | Date | Specifies the date when the sales order was created, which also determines applicable prices and discounts. |
| "Posting Date" | Date | Specifies the date when the sales document was posted to the general ledger. |
| "Shipment Date" | Date | Specifies the date when items on the document are scheduled to ship or were shipped. |
| "Posting Description" | Text[100] | Specifies the description that appears on posted ledger entries for this document. |
| "Payment Terms Code" | Code[10] | Specifies the payment terms that determine due dates, discount dates, and discount amounts for the sales document. |
| "Due Date" | Date | Specifies the date by which the customer must pay the sales invoice. |
| "Payment Discount %" | Decimal | Specifies the percentage discount granted if the customer pays by the payment discount date. |
| "Pmt. Discount Date" | Date | Specifies the last date on which the customer can pay to receive a payment discount. |
| "Shipment Method Code" | Code[10] | Specifies the delivery conditions for the shipment, such as free on board (FOB) or cost, insurance, and freight (CIF). |
| "Location Code" | Code[10] | Specifies the default warehouse location from which items on the sales document are shipped. |
| "Shortcut Dimension 1 Code" | Code[20] | Specifies the first global dimension code for analyzing the document, typically representing a department or cost center. |
| "Shortcut Dimension 2 Code" | Code[20] | Specifies the second global dimension code for analyzing the document, typically representing a project or region. |
| "Customer Posting Group" | Code[20] | Specifies the posting group that determines the G/L accounts to use for posting receivables and other financial entries. |
| "Currency Code" | Code[10] | Specifies the currency in which the sales document amounts are expressed. |
| "Currency Factor" | Decimal | Specifies the exchange rate used to convert document amounts from the document currency to the local currency. |
| "Price Group Code" | Code[10] | Specifies the customer price group used to determine special sales prices for the customer. |
| "Prices Including VAT" | Boolean | Indicates whether the unit prices and line amounts on the document include VAT. |
| "Invoice Disc. Code" | Code[20] | Specifies the code used to look up the invoice discount terms for the customer. |
| "Cust./Item Disc. Gr." | Code[20] | Specifies the customer discount group used to determine item-specific discounts for the customer. |
| "Language Code" | Code[10] | Specifies the language code used when printing documents for this customer. |
| "Format Region" | Text[80] | Specifies the regional format settings used for dates, numbers, and currency formatting on printed documents. |
| "Salesperson Code" | Code[20] | Specifies the salesperson responsible for this sales document for commission and performance tracking. |
| "Order Class" | Code[10] | Specifies the classification of the sales order for categorization and analysis purposes. |
| Comment | Boolean | Indicates whether comments exist for this archived sales document header. |
| "No. Printed" | Integer | Stores the number of times this sales document was printed before archiving. |
| "On Hold" | Code[3] | Specifies a code indicating that the document processing was placed on hold. |
| "Applies-to Doc. Type" | Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type" | Specifies the type of posted document to which this sales document is applied for payment or settlement purposes. |
| "Applies-to Doc. No." | Code[20] | Specifies the number of the posted document to which this sales document is applied for payment or settlement purposes. |
| "Bal. Account No." | Code[20] | Specifies the balancing account number used for posting the sales document. |
| Ship | Boolean | Indicates whether shipment was selected to be posted when the document was archived. |
| Invoice | Boolean | Indicates whether invoice posting was selected when the document was archived. |
| Amount | Decimal | Contains the total amount of all lines on the archived sales document, excluding VAT. |
| "Amount Including VAT" | Decimal | Contains the total amount of all lines on the archived sales document, including VAT. |
| "Shipping No." | Code[20] | Specifies the number assigned to the shipment document created from this sales order. |
| "Posting No." | Code[20] | Specifies the number assigned to the posted invoice or credit memo created from this document. |
| "Last Shipping No." | Code[20] | Specifies the number of the most recently posted shipment document for this sales order. |
| "Last Posting No." | Code[20] | Specifies the number of the most recently posted invoice or credit memo for this sales document. |
| "Prepayment No." | Code[20] | Specifies the number of the prepayment invoice for this sales order. |
| "Last Prepayment No." | Code[20] | Specifies the number of the most recently posted prepayment invoice for this sales order. |
| "Prepmt. Cr. Memo No." | Code[20] | Specifies the number of the prepayment credit memo for this sales order. |
| "Last Prepmt. Cr. Memo No." | Code[20] | Specifies the number of the most recently posted prepayment credit memo for this sales order. |
| "VAT Registration No." | Text[20] | Specifies the customer's VAT registration number for tax reporting purposes. |
| "Combine Shipments" | Boolean | Indicates whether multiple orders for the customer can be combined into a single shipment. |
| "Reason Code" | Code[10] | Specifies the reason code explaining why the document was created or modified. |
| "Gen. Bus. Posting Group" | Code[20] | Specifies the general business posting group used to determine the G/L accounts for posting sales transactions. |
| "EU 3-Party Trade" | Boolean | Indicates whether the transaction involves a triangular trade arrangement within the European Union. |
| "Transaction Type" | Code[10] | Specifies the type of transaction for Intrastat reporting, such as purchase, sale, or transfer. |
| "Transport Method" | Code[10] | Specifies the method of transport used for the shipment, for Intrastat reporting purposes. |
| "VAT Country/Region Code" | Code[10] | Specifies the country or region where VAT is reported, typically the customer's country. |
| "Sell-to Customer Name" | Text[100] | Specifies the name of the customer who receives the products and is billed by default. |
| "Sell-to Customer Name 2" | Text[50] | Specifies additional name information for the sell-to customer when the full name cannot fit in the primary field. |
| "Sell-to Address" | Text[100] | Specifies the street address of the customer who receives the products. |
| "Sell-to Address 2" | Text[50] | Specifies additional address information for the sell-to customer when the full address cannot fit in the primary field. |
| "Sell-to City" | Text[30] | Specifies the city of the sell-to customer's main address. |
| "Sell-to Contact" | Text[100] | Specifies the name of the contact person at the sell-to customer's main address. |
| "Bill-to Post Code" | Code[20] | Specifies the postal code of the customer's billing address. |
| "Bill-to County" | Text[30] | Specifies the county, state, or province of the billing customer's address. |
| "Bill-to Country/Region Code" | Code[10] | Specifies the country or region of the billing customer's address. |
| "Sell-to Post Code" | Code[20] | Specifies the postal code of the sell-to customer's main address. |
| "Sell-to County" | Text[30] | Specifies the county, state, or province of the sell-to customer's address. |
| "Sell-to Country/Region Code" | Code[10] | Specifies the country or region of the sell-to customer's address. |
| "Ship-to Post Code" | Code[20] | Specifies the postal code of the shipping destination address. |
| "Ship-to County" | Text[30] | Specifies the county, state, or province of the shipping destination address. |
| "Ship-to Country/Region Code" | Code[10] | Specifies the country or region of the shipping destination address. |
| "Bal. Account Type" | Enum Microsoft.Bank.Payment."Payment Balance Account Type" | Specifies the type of balancing account used for posting, such as G/L Account or Bank Account. |
| "Exit Point" | Code[10] | Specifies the point of exit through which items are shipped out of the country or region for Intrastat reporting. |
| Correction | Boolean | Indicates whether the document represents a correction to a previously posted document. |
| "Document Date" | Date | Specifies the date when the sales document was created. |
| "External Document No." | Code[35] | Specifies the customer's document number, such as a purchase order number, for cross-reference purposes. |
| "Area" | Code[10] | Specifies the geographic area or destination area for Intrastat reporting purposes. |
| "Transaction Specification" | Code[10] | Specifies additional transaction details for Intrastat reporting, providing further classification of the trade. |
| "Payment Method Code" | Code[10] | Specifies the method by which the customer will pay for the products, such as bank transfer or check. |
| "Shipping Agent Code" | Code[10] | Specifies the shipping carrier responsible for transporting the items to the customer. |
| "Package Tracking No." | Text[50] | Specifies the tracking number assigned by the shipping carrier for package tracking purposes. |
| "No. Series" | Code[20] | Specifies the number series used to assign document numbers to this type of sales document. |
| "Posting No. Series" | Code[20] | Specifies the number series used to assign numbers to posted invoices or credit memos. |
| "Shipping No. Series" | Code[20] | Specifies the number series used to assign numbers to shipment documents. |
| "Tax Area Code" | Code[20] | Specifies the tax area code used to calculate and post sales tax for this document. |
| "Tax Liable" | Boolean | Indicates whether the customer is liable for paying sales tax on the transaction. |
| "VAT Bus. Posting Group" | Code[20] | Specifies the VAT business posting group used to determine VAT rates and accounts for this customer. |
| Reserve | Enum Microsoft.Inventory.Tracking."Reserve Method" | Specifies the reservation method for items on the sales document, such as always, optional, or never. |
| "Applies-to ID" | Code[50] | Specifies the identifier used to group entries for application during payment processing. |
| "VAT Base Discount %" | Decimal | Specifies the percentage discount applied to the VAT base amount for calculating VAT. |
| Status | Enum Microsoft.Sales.Document."Sales Document Status" | Specifies the processing status of the sales document, such as open, released, or pending approval. |
| "Invoice Discount Calculation" | Option | Specifies how the invoice discount is calculated, either as a percentage or a fixed amount. |
| "Invoice Discount Value" | Decimal | Specifies the value of the invoice discount, either as a percentage or amount depending on the calculation method. |
| "Send IC Document" | Boolean | Indicates whether the document should be sent to an intercompany partner. |
| "IC Status" | Enum Microsoft.Intercompany.Setup."Sales Document IC Status" | Specifies the intercompany processing status of the document. |
| "Sell-to IC Partner Code" | Code[20] | Specifies the intercompany partner code for the sell-to customer in intercompany transactions. |
| "Bill-to IC Partner Code" | Code[20] | Specifies the intercompany partner code for the bill-to customer in intercompany transactions. |
| "IC Reference Document No." | Code[20] | Specifies the document number used by the intercompany partner to reference this transaction. |
| "IC Direction" | Enum Microsoft.Intercompany.Setup."IC Direction Type" | Specifies the direction of the intercompany transaction, either outgoing or incoming. |
| "Prepayment %" | Decimal | Specifies the percentage of the order amount that must be prepaid before processing. |
| "Prepayment No. Series" | Code[20] | Specifies the number series used to assign numbers to prepayment invoices. |
| "Compress Prepayment" | Boolean | Indicates whether prepayment lines should be compressed into a single line on the prepayment invoice. |
| "Prepayment Due Date" | Date | Specifies the date when the prepayment invoice is due for payment. |
| "Prepmt. Cr. Memo No. Series" | Code[20] | Specifies the number series used to assign numbers to prepayment credit memos. |
| "Prepmt. Posting Description" | Text[100] | Specifies the description that appears on posted ledger entries for prepayment transactions. |
| "Prepmt. Pmt. Discount Date" | Date | Specifies the last date on which the customer can pay the prepayment to receive a discount. |
| "Prepmt. Payment Terms Code" | Code[10] | Specifies the payment terms applied to prepayment invoices for this sales order. |
| "Prepmt. Payment Discount %" | Decimal | Specifies the payment discount percentage granted if the prepayment is paid by the discount date. |
| "No. of Archived Versions" | Integer | Contains the total number of archived versions for this sales document. |
| "Sales Quote No." | Code[20] | Specifies the number of the sales quote from which this order was created. |
| "Quote Valid Until Date" | Date | Specifies the expiration date of the sales quote after which it is no longer valid. |
| "Quote Sent to Customer" | DateTime | Specifies the date and time when the sales quote was sent to the customer. |
| "Quote Accepted" | Boolean | Indicates whether the sales quote has been accepted by the customer. |
| "Quote Accepted Date" | Date | Specifies the date when the sales quote was accepted by the customer. |
| "Company Bank Account Code" | Code[20] | Specifies the company bank account to which payments for this document should be made. |
| "Incoming Document Entry No." | Integer | Specifies the entry number of the incoming document linked to this sales document. |
| "Sell-to Phone No." | Text[30] | Specifies the telephone number of the sell-to customer. |
| "Sell-to E-Mail" | Text[80] | Specifies the email address of the sell-to customer. |
| "VAT Reporting Date" | Date | Specifies the date used for VAT reporting, which may differ from the posting date. |
| "Rcvd.-from Count./Region Code" | Code[10] | Specifies the country or region from which goods were received for Intrastat reporting. |
| "Work Description" | Blob | Contains a detailed description of the work or services to be performed for this sales document. |
| "Ship-to Phone No." | Text[30] | Specifies the telephone number at the shipping destination address. |
| "Dimension Set ID" | Integer | Specifies the unique identifier for the combination of dimension values assigned to this document. |
| "Source Doc. Exists" | Boolean | Indicates whether the original source sales document still exists in the system. |
| "Last Archived Date" | DateTime | Contains the date and time when this document was last archived. |
| "Interaction Exist" | Boolean | Indicates whether the archived document is linked to an interaction log entry for CRM tracking. |
| "Time Archived" | Time | Specifies the time of day when this version of the document was archived. |
| "Date Archived" | Date | Specifies the date when this version of the document was archived. |
| "Archived By" | Code[50] | Specifies the user who created this archived version of the document. |
| "Version No." | Integer | Specifies the version number of this archived document within the document occurrence. |
| "Doc. No. Occurrence" | Integer | Specifies the occurrence count when the same document number has been reused multiple times. |
| "Campaign No." | Code[20] | Specifies the marketing campaign associated with this sales document. |
| "Sell-to Contact No." | Code[20] | Specifies the contact person at the sell-to customer's organization. |
| "Bill-to Contact No." | Code[20] | Specifies the contact person at the billing customer's organization. |
| "Bill-to Customer Template Code" | Code[10] | |
| "Opportunity No." | Code[20] | Specifies the sales opportunity linked to this document for CRM tracking. |
| "Sell-to Customer Templ. Code" | Code[20] | Specifies the template code used when creating a new customer from a quote or contact. |
| "Bill-to Customer Templ. Code" | Code[20] | Specifies the template code used when creating a new billing customer from a quote or contact. |
| "Responsibility Center" | Code[10] | Specifies the responsibility center associated with this sales document for organizational reporting. |
| "Shipping Advice" | Enum Microsoft.Foundation.Shipping."Sales Header Shipping Advice" | Specifies whether partial shipments are allowed or all items must be shipped together. |
| "Completely Shipped" | Boolean | Indicates whether all items on the sales order have been shipped. |
| "Posting from Whse. Ref." | Integer | Specifies an internal reference number for warehouse posting integration. |
| "Location Filter" | Code[10] | Specifies a filter for displaying document lines by warehouse location. |
| "Requested Delivery Date" | Date | Specifies the date the customer has requested for delivery of the order. |
| "Promised Delivery Date" | Date | Specifies the date that was promised to the customer for delivery, based on order promising calculations. |
| "Shipping Time" | DateFormula | Specifies the transit time from shipment to delivery at the customer's location. |
| "Outbound Whse. Handling Time" | DateFormula | Specifies the time required to prepare and process items in the warehouse before shipping. |
| "Shipping Agent Service Code" | Code[10] | Specifies the service level offered by the shipping agent, such as overnight or ground delivery. |
| "Late Order Shipping" | Boolean | Indicates whether there are outstanding order lines with shipment dates that have passed. |
| "Date Filter" | Date | Specifies a date filter used for filtering FlowFields on the document. |
| Receive | Boolean | Indicates whether receiving was selected when posting a return order. |
| "Return Receipt No." | Code[20] | Specifies the number assigned to the return receipt document. |
| "Return Receipt No. Series" | Code[20] | Specifies the number series used to assign numbers to return receipt documents. |
| "Last Return Receipt No." | Code[20] | Specifies the number of the most recently posted return receipt for this return order. |
| "Price Calculation Method" | Enum Microsoft.Pricing.Calculation."Price Calculation Method" | Specifies the method used to calculate prices for the sales document. |
| "Allow Line Disc." | Boolean | Indicates whether line discounts are allowed for this sales document. |
| "Get Shipment Used" | Boolean | Indicates whether the Get Shipment Lines function was used to populate the document. |
| "Assigned User ID" | Code[50] | Specifies the user who was assigned responsibility for processing this sales document. |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemCreatedByUserName | Text[50] | |
| SystemCreatedByFullName | Text[80] | |
| SystemModifiedByUserName | Text[50] | |
| SystemModifiedByFullName | Text[80] | |
| SystemRowVersion | BigInteger |
Methods
ShowDimensions
Opens the Dimension Set Entries page to display the dimensions associated with this archived sales header.
procedure ShowDimensions()
SetSecurityFilterOnRespCenter
Applies a security filter to restrict records based on the current user's assigned responsibility center.
procedure SetSecurityFilterOnRespCenter()
GetWorkDescription
Retrieves the work description text from the BLOB field as a readable text string.
procedure GetWorkDescription(): Text
Returns
| Type | Description |
|---|---|
| Text |
The work description text content. |
Events
OnBeforeSetSecurityFilterOnRespCenter
Raises an event before applying the security filter based on the user's responsibility center.
[IntegrationEvent(False,False)]
local procedure OnBeforeSetSecurityFilterOnRespCenter(var SalesHeaderArchive: Record "Sales Header Archive"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeaderArchive | Table Microsoft.Sales.Archive."Sales Header Archive" |
Specifies the sales header archive record to filter. |
| IsHandled | Boolean |
Set to true to skip the default filter logic. |