Table 172 "Standard Customer Sales Code"
Base Application · Microsoft.Sales.Document
Across versions
- BC23present
- BC241 events added
- BC25-26unchanged
- BC271 events added
- BC2813 fields changed
- BC29-30unchanged
Neighbourhood 10 connected objects and pages
Base Application · Microsoft.Sales.Document · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Caption | Standard Customer Sales Code |
| DataClassification | CustomerContent |
Fields
Explanation: the field’s ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.
| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Customer No. Δ BC28 | Code[20] | Specifies the customer number of the customer to which the standard sales code is assigned. | TableRelation Table 18 “Customer”; NotBlank |
| 2 | Code Δ BC28 | Code[10] | Specifies a standard sales code from the Standard Sales Code table. | TableRelation Table 170 “Standard Sales Code” (Standard Sales Code); NotBlank |
| 3 | Description Δ BC28 | Text[100] | Specifies a description of the standard sales code. | |
| 4 | Valid From Date Δ BC28 | Date | Specifies the first day when the Create Recurring Sales Inv. batch job can be used to create sales invoices. | |
| 5 | Valid To date Δ BC28 | Date | Specifies the last day when the Create Recurring Sales Inv. batch job can be used to create sales invoices. | |
| 6 | Payment Method Code Δ BC28 | Code[10] | Specifies how to make payment, such as with bank transfer, cash, or check. | TableRelation Table 289 “Payment Method” (Payment Method) |
| 7 | Payment Terms Code Δ BC28 | Code[10] | Specifies a formula that calculates the payment due date, payment discount date, and payment discount amount. | TableRelation Table 3 “Payment Terms” (Payment Terms) |
| 8 | Direct Debit Mandate ID Δ BC28 | Code[35] | Specifies the ID of the direct-debit mandate that this standard customer sales code uses to create sales invoices for direct debit collection. | TableRelation Table 1230 “SEPA Direct Debit Mandate” (“SEPA Direct Debit Mandate” where(“Customer No.” = field(“Customer No.”), Blocked = const(false), Closed = const(false))) |
| 9 | Blocked Δ BC28 | Boolean | Specifies that the related record is blocked from being posted in transactions, for example a customer that is declared insolvent or an item that is placed in quarantine. | |
| 13 | Currency Code | Code[10] | — | TableRelation Table 4 “Currency”; not editable |
| 15 | Insert Rec. Lines On Quotes Δ BC28 | Option | Specifies how you want to use standard sales codes on sales quotes. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |
| 16 | Insert Rec. Lines On Orders Δ BC28 | Option | Specifies how you want to use standard sales codes on sales orders. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |
| 17 | Insert Rec. Lines On Invoices Δ BC28 | Option | Specifies how you want to use standard sales codes on sales invoices. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |
| 18 | Insert Rec. Lines On Cr. Memos Δ BC28 | Option | Specifies how you want to use standard sales codes on sales credit memos. | OptionCaption: Manual,Automatic,Always Ask; DataClassification SystemMetadata |
Keys
- Key1: Customer No., Code (clustered)
- Key2: Code, Currency Code
Events published
OnAfterCreateSalesInvoice(var SalesHeader: Record "Sales Header"; StandardCustomerSalesCode: Record "Standard Customer Sales Code")(integration)OnAfterCombineDimensions(var SalesLine: Record "Sales Line"; StdSalesLine: Record "Standard Sales Line")(integration)OnAfterApplyStdCodesToSalesLinesLoop(var StdSalesLine: Record "Standard Sales Line"; var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; StdSalesCode: Record "Standard Sales Code")(integration)OnBeforeApplyStdCodesToSalesLines(var SalesLine: Record "Sales Line"; StdSalesLine: Record "Standard Sales Line")(integration)OnBeforeApplyStdCodesToSalesLinesLoop(var StdSalesLine: Record "Standard Sales Line"; var SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; StdSalesCode: Record "Standard Sales Code")(integration)OnBeforeCreateSalesInvoice(var StandardCustomerSalesCode: Record "Standard Customer Sales Code"; OrderDate: Date; PostingDate: Date; var IsHandled: Boolean)(integration)OnBeforeStdCustSalesCodesSetTableView(var StandardCustomerSalesCode: Record "Standard Customer Sales Code"; var SalesHeader: Record "Sales Header")(integration)OnCreateSalesInvoiceOnBeforeSalesHeaderInsert(var SalesHeader: Record "Sales Header"; StandardCustomerSalesCode: Record "Standard Customer Sales Code")(integration)OnCreateSalesInvoiceOnBeforeSalesHeaderModify(var SalesHeader: Record "Sales Header"; StandardCustomerSalesCode: Record "Standard Customer Sales Code")(integration)OnAfterSalesLineInsert(var StdSalesLine: Record "Standard Sales Line"; var SalesLine: Record "Sales Line")(integration)OnBeforeApplyStdCodesToSalesLinesProcedure(var SalesHeader: Record "Sales Header"; StandardCustomerSalesCode: Record "Standard Customer Sales Code"; var IsHandled: Boolean)(integration)OnInsertSalesLineOnBeforeApplyStdCodesToSalesLines(StdCustSalesCode: Record "Standard Customer Sales Code")(integration)OnApplyStdCodesToSalesLinesOnAfterValidateSalesLineNo(StdCustSalesCode: Record "Standard Customer Sales Code"; var SalesLine: Record "Sales Line")(integration)OnApplyStdCodesToSalesLinesOnAfterSetSalesLineLineNo(var StdCustSalesCode: Record "Standard Customer Sales Code"; var SalesLine: Record "Sales Line"; var IsHandled: Boolean)(integration)OnApplyStdCodesToSalesLinesOnAfterInsertExtendedText(var StdCustSalesCode: Record "Standard Customer Sales Code"; var StdSalesLine: Record "Standard Sales Line"; var SalesLine: Record "Sales Line")(integration)OnApplyStdCodesToSalesLinesOnBeforeRoundUnitPrice(var SalesLine: Record "Sales Line"; StandardSalesLine: Record "Standard Sales Line"; var IsHandled: Boolean)(integration)OnApplyStdCodesToSalesLinesOnAfterValidateType(var SalesLine: Record "Sales Line"; var StandardSalesLine: Record "Standard Sales Line")+ BC24 (integration)OnAfterSetFilterByAutomaticAndAlwaysAskCodes(var StandardCustomerSalesCode: Record "Standard Customer Sales Code"; SalesHeader: Record "Sales Header")+ BC27 (integration)
Procedures
CreateSalesInvoice(OrderDate: Date; PostingDate: Date): Creates a sales invoice using the standard sales code for the customer.InsertSalesLines(var SalesHeader: Record "Sales Header"): Opens a page to select standard customer sales codes and inserts the selected lines into the sales header.ApplyStdCodesToSalesLines(var SalesHeader: Record "Sales Header"; StdCustSalesCode: Record "Standard Customer Sales Code"): Applies the standard sales code lines to the sales document.InsertExtendedText(SalesLine: Record "Sales Line"): Inserts extended text for a sales line if applicable.InsertExtendedText(SalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"): Inserts extended text for a sales line using the sales header context.GetNextLineNo(SalesLine: Record "Sales Line"): Integer: Gets the next available line number for a sales document.SetFilterByAutomaticAndAlwaysAskCodes(SalesHeader: Record "Sales Header"): Sets filters on the record to find standard sales codes that should be automatically or always-ask inserted.IsInsertRecurringLinesOnDocumentAutomatic(SalesHeader: Record "Sales Header"): Boolean: Checks if recurring lines should be automatically inserted for the document type.ShouldAutoInsertRecurringLinesOnDocument(SalesHeader: Record "Sales Header"): Boolean: Checks if recurring lines should be auto-inserted (automatic or always-ask) for the document type.
Plus 1 local procedures.
Triggers
OnRename
Relations
- Direct Debit Mandate ID: TableRelation Table 1230 “SEPA Direct Debit Mandate”
- Code: TableRelation Table 170 “Standard Sales Code”
- Customer No.: TableRelation Table 18 “Customer”
- Payment Method Code: TableRelation Table 289 “Payment Method”
- Payment Terms Code: TableRelation Table 3 “Payment Terms”
- Currency Code: TableRelation Table 4 “Currency”
Pages and codeunits on this table
- Page 173 “Standard Customer Sales Codes” (source table)
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 378 “Transfer Extended Text” (2 calls:
InsertExtendedText → InsertSalesExtText,InsertExtendedText → SalesCheckIfAnyExtText) - Codeunit 408 “DimensionManagement” (1 call:
CombineDimensions → GetCombinedDimensionSetID) - Codeunit 5720 “Item Reference Management” (1 call:
ApplyStdCodesToSalesLines → EnterSalesItemReference)
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "table", object_name: "Standard Customer Sales Code"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.