Table Customer
Stores customer master data including contact information, financial settings, and sales preferences.
Properties
| Name | Value |
|---|---|
| Caption | Customer |
| DataCaptionFields | 1,2 |
| DrillDownPageID | Page Microsoft.Sales.Customer."Customer List" |
| LookupPageID | Page Microsoft.Sales.Customer."Customer Lookup" |
| Permissions | TableData "Cust. Ledger Entry" = r, TableData Job = r, tabledata "VAT Business Posting Group" = R, TableData "VAT Registration Log" = rd, tabledata "Payment Terms" = R, TableData "Price List Header" = rd, TableData "Price List Line" = rd, TableData "Sales Price" = rd, TableData "Sales Line Discount" = rd, TableData "Sales Price Access" = rd, TableData "Sales Discount Access" = rd, tabledata "Customer Templ." = rm, tabledata "General Ledger Setup" = r, tabledata "Sales & Receivables Setup" = r, tabledata "Marketing Setup" = r, tabledata Language = r, tabledata "Language Selection" = r |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| "No." | Code[20] | Specifies the unique identifier for the customer record. |
| Name | Text[100] | Specifies the customer's name as it appears on sales documents and reports. |
| "Search Name" | Code[100] | Specifies an alternate name used for searching and filtering customers. |
| "Name 2" | Text[50] | Specifies additional name information for the customer. |
| Address | Text[100] | Specifies the customer's street address for correspondence and shipping. |
| "Address 2" | Text[50] | Specifies additional address details such as suite or building information. |
| City | Text[30] | Specifies the city where the customer is located. |
| Contact | Text[100] | Specifies the name of the primary contact person for this customer. |
| "Phone No." | Text[30] | Specifies the customer's primary telephone number. |
| "Telex No." | Text[20] | Specifies the customer's telex number for legacy communication. |
| "Document Sending Profile" | Code[20] | Specifies the preferred method for sending sales documents to this customer. |
| "Ship-to Code" | Code[10] | Specifies the default ship-to address code for deliveries to this customer. |
| "Our Account No." | Text[20] | Specifies this company's account number as known by the customer. |
| "Territory Code" | Code[10] | Specifies the sales territory code assigned to this customer. |
| "Global Dimension 1 Code" | Code[20] | Specifies the first global dimension code assigned to this customer for analysis. |
| "Global Dimension 2 Code" | Code[20] | Specifies the second global dimension code assigned to this customer for analysis. |
| "Chain Name" | Code[10] | Specifies the retail chain or franchise this customer belongs to. |
| "Budgeted Amount" | Decimal | Specifies the budgeted sales amount for this customer. |
| "Credit Limit (LCY)" | Decimal | Specifies the maximum credit amount in local currency extended to this customer. |
| "Customer Posting Group" | Code[20] | Specifies the posting group that determines G/L accounts for customer transactions. |
| "Currency Code" | Code[10] | Specifies the default currency code for transactions with this customer. |
| "Customer Price Group" | Code[10] | Specifies the price group used to determine special sales prices for this customer. |
| "Language Code" | Code[10] | Specifies the language code used for documents sent to this customer. |
| "Registration Number" | Text[50] | Specifies the customer's official registration number. |
| "Statistics Group" | Integer | Specifies a statistics group code for categorizing the customer in reports. |
| "Payment Terms Code" | Code[10] | Specifies the default payment terms for invoices to this customer. |
| "Fin. Charge Terms Code" | Code[10] | Specifies the finance charge terms applied to overdue invoices for this customer. |
| "Salesperson Code" | Code[20] | Specifies the salesperson responsible for this customer account. |
| "Shipment Method Code" | Code[10] | Specifies the default shipment method for deliveries to this customer. |
| "Shipping Agent Code" | Code[10] | Specifies the default shipping agent for deliveries to this customer. |
| "Place of Export" | Code[20] | Specifies the place of export for customs documentation purposes. |
| "Invoice Disc. Code" | Code[20] | Specifies the code used to calculate invoice discounts for this customer. |
| "Customer Disc. Group" | Code[20] | Specifies the discount group used to determine line discounts for this customer. |
| "Country/Region Code" | Code[10] | Specifies the country or region code for the customer's address. |
| "Collection Method" | Code[20] | Specifies the method used for collecting payments from this customer. |
| Amount | Decimal | Contains the total amount from customer ledger entries within the date filter. |
| Comment | Boolean | Indicates whether comments exist for this customer record. |
| Blocked | Enum Microsoft.Sales.Customer."Customer Blocked" | Specifies whether the customer is blocked for transactions. |
| "Invoice Copies" | Integer | |
| "Last Statement No." | Integer | Specifies the number of the last printed customer statement. |
| "Print Statements" | Boolean | Indicates whether to include this customer when printing statements. |
| "Bill-to Customer No." | Code[20] | Specifies a different customer to receive invoices for sales to this customer. |
| Priority | Integer | Specifies the priority level assigned to this customer for order processing. |
| "Payment Method Code" | Code[10] | Specifies the default payment method for this customer. |
| "Format Region" | Text[80] | Specifies the regional format used for dates and numbers on documents for this customer. |
| "First Transaction Date" | Date | Contains the date of the first transaction with this customer. |
| "Last Modified Date Time" | DateTime | Indicates the date and time when this customer record was last modified. |
| "Last Date Modified" | Date | Indicates the date when this customer record was last modified. |
| "Date Filter" | Date | Specifies a date range filter for calculating FlowFields. |
| "Global Dimension 1 Filter" | Code[20] | Specifies a filter for the first global dimension in FlowField calculations. |
| "Global Dimension 2 Filter" | Code[20] | Specifies a filter for the second global dimension in FlowField calculations. |
| Balance | Decimal | Contains the customer's current outstanding balance in the customer's currency. |
| "Balance (LCY)" | Decimal | Contains the customer's current outstanding balance in local currency. |
| "Net Change" | Decimal | Contains the net change in the customer's balance within the date filter period. |
| "Net Change (LCY)" | Decimal | Contains the net change in the customer's balance in local currency within the date filter period. |
| "Sales (LCY)" | Decimal | Contains the total sales amount in local currency for this customer within the date filter. |
| "Profit (LCY)" | Decimal | Contains the total profit in local currency from sales to this customer. |
| "Inv. Discounts (LCY)" | Decimal | Contains the total invoice discounts in local currency given to this customer. |
| "Pmt. Discounts (LCY)" | Decimal | Contains the total payment discounts in local currency taken by this customer. |
| "Balance Due" | Decimal | Contains the overdue balance in the customer's currency that is past due date. |
| "Balance Due (LCY)" | Decimal | Contains the overdue balance in local currency that the customer has not yet paid. |
| Payments | Decimal | Contains the total payments received from this customer within the date filter. |
| "Invoice Amounts" | Decimal | Contains the total invoice amounts for this customer within the date filter. |
| "Cr. Memo Amounts" | Decimal | Contains the total credit memo amount issued to this customer within the date filter. |
| "Finance Charge Memo Amounts" | Decimal | Contains the total finance charge memo amount for this customer within the date filter. |
| "Payments (LCY)" | Decimal | Contains the total payments in local currency received from this customer. |
| "Inv. Amounts (LCY)" | Decimal | Contains the total invoice amounts in local currency for this customer. |
| "Cr. Memo Amounts (LCY)" | Decimal | Contains the total credit memo amount in local currency issued to this customer. |
| "Fin. Charge Memo Amounts (LCY)" | Decimal | Contains the total finance charge memo amount in local currency for this customer. |
| "Outstanding Orders" | Decimal | Contains the total value of outstanding sales orders for this customer. |
| "Shipped Not Invoiced" | Decimal | Contains the total value of shipped but not yet invoiced items for this customer. |
| "Application Method" | Enum Microsoft.Finance.ReceivablesPayables."Application Method" | Specifies the method used to apply payments to customer ledger entries. |
| "Prices Including VAT" | Boolean | Indicates whether prices on sales documents include VAT for this customer. |
| "Location Code" | Code[10] | Specifies the default warehouse location for shipments to this customer. |
| "Fax No." | Text[30] | Specifies the customer's fax number for document transmission. |
| "Telex Answer Back" | Text[20] | Specifies the customer's telex answer back code for legacy communication. |
| "VAT Registration No." | Text[20] | Specifies the customer's VAT registration number for tax reporting. |
| "Combine Shipments" | Boolean | Indicates whether multiple shipments can be combined on a single invoice for this customer. |
| "Gen. Bus. Posting Group" | Code[20] | Specifies the general business posting group for determining G/L accounts. |
| GLN | Code[13] | Specifies the customer's Global Location Number for electronic document exchange. |
| "Post Code" | Code[20] | Specifies the postal code for the customer's address. |
| County | Text[30] | Specifies the state, province, or county for the customer's address. |
| "EORI Number" | Text[40] | Specifies the customer's Economic Operators Registration and Identification number for customs. |
| "Use GLN in Electronic Document" | Boolean | Indicates whether the GLN is used as party identification in electronic documents. |
| "Debit Amount" | Decimal | Contains the total debit amount from customer ledger entries within the date filter. |
| "Credit Amount" | Decimal | Contains the total credit amount from customer ledger entries within the date filter. |
| "Debit Amount (LCY)" | Decimal | Contains the total debit amount in local currency from customer ledger entries. |
| "Credit Amount (LCY)" | Decimal | Contains the total credit amount in local currency from customer ledger entries. |
| "E-Mail" | Text[80] | Specifies the customer's email address for electronic communication. |
| "Home Page" | Text[255] | Specifies the customer's website URL. |
| "Reminder Terms Code" | Code[10] | Specifies the terms used to generate payment reminders for this customer. |
| "Reminder Amounts" | Decimal | Contains the total amount of reminders issued to this customer. |
| "Reminder Amounts (LCY)" | Decimal | Contains the total reminder amounts in local currency issued to this customer. |
| "No. Series" | Code[20] | Specifies the number series used to assign the customer number. |
| "Tax Area Code" | Code[20] | Specifies the tax area code for calculating sales tax for this customer. |
| "Tax Liable" | Boolean | Indicates whether sales to this customer are subject to sales tax. |
| "VAT Bus. Posting Group" | Code[20] | Specifies the VAT business posting group for determining VAT rates. |
| "Currency Filter" | Code[10] | Specifies a currency filter for calculating FlowFields. |
| "Outstanding Orders (LCY)" | Decimal | Contains the total outstanding sales orders in local currency for this customer. |
| "Shipped Not Invoiced (LCY)" | Decimal | Contains the total shipped but not invoiced amount in local currency for this customer. |
| Reserve | Enum Microsoft.Inventory.Tracking."Reserve Method" | Specifies the default inventory reservation method for sales to this customer. |
| "Block Payment Tolerance" | Boolean | Indicates whether payment tolerance is blocked for this customer. |
| "Pmt. Disc. Tolerance (LCY)" | Decimal | Contains the total payment discount tolerance amounts in local currency for this customer. |
| "Pmt. Tolerance (LCY)" | Decimal | Contains the total payment tolerance amounts in local currency for this customer. |
| "IC Partner Code" | Code[20] | Specifies the intercompany partner code for transactions between related companies. |
| Refunds | Decimal | Contains the total refund amounts for this customer within the date filter. |
| "Refunds (LCY)" | Decimal | Contains the total refund amounts in local currency for this customer. |
| "Other Amounts" | Decimal | Contains other miscellaneous amounts for this customer within the date filter. |
| "Other Amounts (LCY)" | Decimal | Contains other miscellaneous amounts in local currency for this customer. |
| "Prepayment %" | Decimal | Specifies the default prepayment percentage required for sales orders. |
| "Outstanding Invoices (LCY)" | Decimal | Contains the total outstanding invoices in local currency for this customer. |
| "Outstanding Invoices" | Decimal | Contains the total outstanding invoices for this customer. |
| "Bill-to No. Of Archived Doc." | Integer | Contains the count of archived documents where this customer is the bill-to customer. |
| "Sell-to No. Of Archived Doc." | Integer | Contains the count of archived documents where this customer is the sell-to customer. |
| "Partner Type" | Enum Microsoft.Foundation.Enums."Partner Type" | Specifies whether the customer is a person or company for direct debit collections. |
| "Intrastat Partner Type" | Enum Microsoft.Foundation.Enums."Partner Type" | Specifies whether the customer is a person or company for Intrastat reporting. |
| "Exclude from Pmt. Practices" | Boolean | Indicates whether to exclude this customer from payment practices calculations. |
| Image | Media | Stores an image such as a logo for the customer. |
| "Privacy Blocked" | Boolean | Indicates whether access to this customer's data is blocked for privacy protection. |
| "Disable Search by Name" | Boolean | Indicates whether searching by name is disabled, allowing name changes on open documents. |
| "Allow Multiple Posting Groups" | Boolean | Indicates whether multiple posting groups can be used for this customer. |
| "Preferred Bank Account Code" | Code[20] | Specifies the customer's preferred bank account for refunds and direct debit collections. |
| "Coupled to CRM" | Boolean | Indicates whether this customer is coupled to a Dataverse account. Obsolete field. |
| "Coupled to Dataverse" | Boolean | Indicates whether this customer is coupled to a Dataverse account for data synchronization. |
| "Cash Flow Payment Terms Code" | Code[10] | Specifies alternative payment terms used for cash flow forecasting. |
| "Primary Contact No." | Code[20] | Specifies the primary contact person linked to this customer. |
| "Contact Type" | Enum Microsoft.CRM.Contact."Contact Type" | Specifies whether the customer contact is a person or a company. |
| "Mobile Phone No." | Text[30] | Specifies the customer's mobile phone number. |
| "Responsibility Center" | Code[10] | Specifies the responsibility center that manages this customer account. |
| "Shipping Advice" | Enum Microsoft.Foundation.Shipping."Sales Header Shipping Advice" | Specifies whether the customer requires complete or allows partial shipment of orders. |
| "Shipping Time" | DateFormula | Specifies the default shipping time from warehouse to customer delivery. |
| "Shipping Agent Service Code" | Code[10] | Specifies the default shipping agent service level for deliveries to this customer. |
| "Price Calculation Method" | Enum Microsoft.Pricing.Calculation."Price Calculation Method" | Specifies the method used to calculate sales prices for this customer. |
| "Allow Line Disc." | Boolean | Indicates whether line discounts can be applied to sales for this customer. |
| "No. of Quotes" | Integer | Contains the count of open sales quotes for this customer. |
| "No. of Blanket Orders" | Integer | Contains the count of open blanket orders for this customer. |
| "No. of Orders" | Integer | Contains the count of open sales orders for this customer. |
| "No. of Invoices" | Integer | Contains the count of open sales invoices for this customer. |
| "No. of Return Orders" | Integer | Contains the count of open sales return orders for this customer. |
| "No. of Credit Memos" | Integer | Contains the count of open sales credit memos for this customer. |
| "No. of Pstd. Shipments" | Integer | Contains the count of posted sales shipments for this customer. |
| "No. of Pstd. Invoices" | Integer | Contains the count of posted sales invoices for this customer. |
| "No. of Pstd. Return Receipts" | Integer | Contains the count of posted return receipts for this customer. |
| "No. of Pstd. Credit Memos" | Integer | Contains the count of posted sales credit memos for this customer. |
| "No. of Ship-to Addresses" | Integer | Contains the count of ship-to addresses defined for this customer. |
| "Bill-To No. of Quotes" | Integer | Contains the count of quotes where this customer is the bill-to customer. |
| "Bill-To No. of Blanket Orders" | Integer | Contains the count of blanket orders where this customer is the bill-to customer. |
| "Bill-To No. of Orders" | Integer | Contains the count of orders where this customer is the bill-to customer. |
| "Bill-To No. of Invoices" | Integer | Contains the count of invoices where this customer is the bill-to customer. |
| "Bill-To No. of Return Orders" | Integer | Contains the count of return orders where this customer is the bill-to customer. |
| "Bill-To No. of Credit Memos" | Integer | Contains the count of credit memos where this customer is the bill-to customer. |
| "Bill-To No. of Pstd. Shipments" | Integer | Contains the count of posted shipments where this customer is the bill-to customer. |
| "Bill-To No. of Pstd. Invoices" | Integer | Contains the count of posted invoices where this customer is the bill-to customer. |
| "Bill-To No. of Pstd. Return R." | Integer | Contains the count of posted return receipts where this customer is the bill-to customer. |
| "Bill-To No. of Pstd. Cr. Memos" | Integer | Contains the count of posted credit memos where this customer is the bill-to customer. |
| "Base Calendar Code" | Code[10] | Specifies the base calendar used for calculating working days and delivery dates. |
| "Copy Sell-to Addr. to Qte From" | Enum Microsoft.CRM.Contact."Contact Type" | Specifies whether to copy the sell-to address from the company or person contact on quotes. |
| "Validate EU Vat Reg. No." | Boolean | Indicates whether to validate the EU VAT registration number for this customer. |
| "Currency Id" | Guid | Specifies the GUID of the currency for API integration. |
| "Payment Terms Id" | Guid | Specifies the GUID of the payment terms for API integration. |
| "Shipment Method Id" | Guid | Specifies the GUID of the shipment method for API integration. |
| "Payment Method Id" | Guid | Specifies the GUID of the payment method for API integration. |
| "Tax Area ID" | Guid | Specifies the GUID of the tax area for API integration. |
| "Contact ID" | Guid | Specifies the GUID of the contact for API integration. |
| "Contact Graph Id" | Text[250] | Specifies the Microsoft Graph identifier for the contact. |
| 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
AssistEdit
Assists the user in selecting or generating a new customer number from the configured number series.
procedure AssistEdit(OldCust: Record Customer): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| OldCust | Table Microsoft.Sales.Customer.Customer |
The customer record containing the current number series to look up related series. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if a new customer number was selected; otherwise, false. |
ValidateShortcutDimCode
Validates and saves the specified shortcut dimension code for the customer.
procedure ValidateShortcutDimCode(FieldNumber: Integer; var ShortcutDimCode: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| FieldNumber | Integer |
The dimension field number (1 or 2 for global dimensions). |
| ShortcutDimCode | Code[20] |
The dimension value code to validate and assign. |
ShowContact
Opens the contact card or contact list for the customer's associated contact.
procedure ShowContact()
LookupContactList
Opens a lookup page for selecting a contact associated with the customer.
procedure LookupContactList()
SetInsertFromContact
Sets whether the customer is being inserted from a contact record.
procedure SetInsertFromContact(FromContact: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| FromContact | Boolean |
True if the customer is being created from a contact; otherwise, false. |
CheckBlockedCustOnDocs
Checks if the customer is blocked for the specified document type and raises an error if blocked.
procedure CheckBlockedCustOnDocs(Cust2: Record Customer; DocType: Enum "Sales Document Type"; Shipment: Boolean; Transaction: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cust2 | Table Microsoft.Sales.Customer.Customer |
The customer record to check for blocked status. |
| DocType | Enum Microsoft.Sales.Document."Sales Document Type" |
The type of sales document being processed. |
| Shipment | Boolean |
Indicates whether the operation involves a shipment. |
| Transaction | Boolean |
Indicates whether this is a posting transaction. |
CheckBlockedCustOnJnls
Checks if the customer is blocked for the specified journal document type and raises an error if blocked.
procedure CheckBlockedCustOnJnls(Cust2: Record Customer; DocType: Enum "Gen. Journal Document Type"; Transaction: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cust2 | Table Microsoft.Sales.Customer.Customer |
The customer record to check for blocked status. |
| DocType | Enum Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Document Type" |
The type of general journal document being processed. |
| Transaction | Boolean |
Indicates whether this is a posting transaction. |
CheckBlockedCustOnJnls
Checks if the customer is blocked for the specified general journal line and raises an error if blocked.
procedure CheckBlockedCustOnJnls(Cust2: Record Customer; var GenJnlLine: Record "Gen. Journal Line"; Transaction: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cust2 | Table Microsoft.Sales.Customer.Customer |
The customer record to check for blocked status. |
| GenJnlLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
The general journal line being validated. |
| Transaction | Boolean |
Indicates whether this is a posting transaction. |
CustBlockedErrorMessage
Raises an error message indicating that the customer is blocked.
procedure CustBlockedErrorMessage(Cust2: Record Customer; Transaction: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cust2 | Table Microsoft.Sales.Customer.Customer |
The blocked customer record. |
| Transaction | Boolean |
Indicates whether this is a posting transaction to determine the error message. |
CustPrivacyBlockedErrorMessage
Raises an error message indicating that the customer is blocked for privacy reasons.
procedure CustPrivacyBlockedErrorMessage(Cust2: Record Customer; Transaction: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cust2 | Table Microsoft.Sales.Customer.Customer |
The privacy-blocked customer record. |
| Transaction | Boolean |
Indicates whether this is a posting transaction to determine the error message. |
GetPrivacyBlockedGenericErrorText
Gets a generic error text for a privacy-blocked customer.
procedure GetPrivacyBlockedGenericErrorText(Cust2: Record Customer): Text[250]
Parameters
| Name | Type | Description |
|---|---|---|
| Cust2 | Table Microsoft.Sales.Customer.Customer |
The privacy-blocked customer record. |
Returns
| Type | Description |
|---|---|
| Text[250] |
The error text indicating the customer is blocked for privacy. |
DisplayMap
Displays the customer's address on an online map service.
procedure DisplayMap()
GetPriceCalculationMethod
Gets the price calculation method for the customer, considering customer price group and sales setup defaults.
procedure GetPriceCalculationMethod(): Enum "Price Calculation Method"
Returns
| Type | Description |
|---|---|
| Enum Microsoft.Pricing.Calculation."Price Calculation Method" |
The applicable price calculation method. |
GetPrimaryContact
Gets the primary contact for the specified customer.
procedure GetPrimaryContact(CustomerNo: Code[20]; var PrimaryContact: Record Contact)
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerNo | Code[20] |
The customer number to find the primary contact for. |
| PrimaryContact | Table Microsoft.CRM.Contact.Contact |
Returns the primary contact record if found. |
GetTotalAmountLCY
Calculates the total amount in local currency including balance, outstanding orders, shipped not invoiced, and outstanding invoices.
procedure GetTotalAmountLCY(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The total amount in local currency. |
GetTotalAmountLCYUI
Calculates the total amount in local currency for UI display purposes using auto-calculated fields.
procedure GetTotalAmountLCYUI(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The total amount in local currency. |
GetSalesLCY
Gets the total sales in local currency for the current fiscal year.
procedure GetSalesLCY(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The total sales amount in local currency for the fiscal year. |
GetTopCustomerHeadlineQueryDocumentTypeFilter
Gets the document type filter for the top customer headline query.
procedure GetTopCustomerHeadlineQueryDocumentTypeFilter(): Text
Returns
| Type | Description |
|---|---|
| Text |
The document type filter text. |
CalcAvailableCredit
Calculates the available credit for the customer based on their credit limit and total outstanding amount.
procedure CalcAvailableCredit(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The available credit amount in local currency. |
CalcAvailableCreditUI
Calculates the available credit for UI display using auto-calculated fields.
procedure CalcAvailableCreditUI(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The available credit amount in local currency. |
CalcOverdueBalance
Calculates the total overdue balance in local currency for the customer.
procedure CalcOverdueBalance(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The overdue balance amount in local currency. |
GetLegalEntityType
Gets the legal entity type as text from the Partner Type field.
procedure GetLegalEntityType(): Text
Returns
| Type | Description |
|---|---|
| Text |
The partner type as formatted text. |
GetLegalEntityTypeLbl
Gets the label for the legal entity type field.
procedure GetLegalEntityTypeLbl(): Text
Returns
| Type | Description |
|---|---|
| Text |
The field caption for Partner Type. |
SetStyle
Determines the display style for the customer based on available credit.
procedure SetStyle(): Text
Returns
| Type | Description |
|---|---|
| Text |
Unfavorable if credit is exceeded; otherwise, empty string. |
HasValidDDMandate
Checks if the customer has a valid SEPA direct debit mandate for the specified date.
procedure HasValidDDMandate(Date: Date): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Date | Date |
The date to check for a valid mandate. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if a valid direct debit mandate exists; otherwise, false. |
GetReturnRcdNotInvAmountLCY
Gets the total return received not invoiced amount in local currency for the customer.
procedure GetReturnRcdNotInvAmountLCY(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The return received not invoiced amount in local currency. |
GetInvoicedPrepmtAmountLCY
Gets the total invoiced prepayment amount in local currency for the customer.
procedure GetInvoicedPrepmtAmountLCY(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The invoiced prepayment amount in local currency. |
CalcCreditLimitLCYExpendedPct
Calculates the percentage of the credit limit that has been used.
procedure CalcCreditLimitLCYExpendedPct(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The credit limit usage percentage multiplied by 100 (0-10000). |
CreateAndShowNewInvoice
Creates a new sales invoice for the customer and opens the Sales Invoice page.
procedure CreateAndShowNewInvoice()
CreateAndShowNewOrder
Creates a new sales order for the customer and opens the Sales Order page.
procedure CreateAndShowNewOrder()
CreateAndShowNewCreditMemo
Creates a new sales credit memo for the customer and opens the Sales Credit Memo page.
procedure CreateAndShowNewCreditMemo()
CreateAndShowNewQuote
Creates a new sales quote for the customer and opens the Sales Quote page.
procedure CreateAndShowNewQuote()
GetBillToCustomerNo
Gets the bill-to customer number, returning the current customer number if no bill-to is specified.
procedure GetBillToCustomerNo(): Code[20]
Returns
| Type | Description |
|---|---|
| Code[20] |
The bill-to customer number or the customer number if not specified. |
HasAddressIgnoreCountryCode
Checks if the customer has address fields populated, excluding the country/region code.
procedure HasAddressIgnoreCountryCode(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if any address field (except country/region) has a value; otherwise, false. |
HasAddress
Checks if the customer has any address fields populated, including country/region code.
procedure HasAddress(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if any address field has a value; otherwise, false. |
HasDifferentAddress
Compares the customer's address with another customer's address.
procedure HasDifferentAddress(OtherCustomer: Record Customer): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| OtherCustomer | Table Microsoft.Sales.Customer.Customer |
The customer record to compare addresses with. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if any address field differs; otherwise, false. |
GetBalanceAsVendor
Gets the balance in local currency from the linked vendor account.
procedure GetBalanceAsVendor(var LinkedVendorNo: Code[20]): Decimal
Parameters
| Name | Type | Description |
|---|---|---|
| LinkedVendorNo | Code[20] |
Returns the linked vendor number. |
Returns
| Type | Description |
|---|---|
| Decimal |
The vendor balance in local currency. |
GetLinkedVendor
Gets the vendor number linked to this customer through the contact business relation.
procedure GetLinkedVendor(): Code[20]
Returns
| Type | Description |
|---|---|
| Code[20] |
The linked vendor number or empty if no link exists. |
GetCustNo
Finds a customer number by text, showing card options if no exact match is found.
procedure GetCustNo(CustomerText: Text): Text
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerText | Text |
The text to search for (customer number or name). |
Returns
| Type | Description |
|---|---|
| Text |
The found or selected customer number. |
GetCustNoOpenCard
Finds a customer number by text with options for displaying customer card and creation options.
procedure GetCustNoOpenCard(CustomerText: Text; ShowCustomerCard: Boolean; ShowCreateCustomerOption: Boolean): Code[20]
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerText | Text |
The text to search for (customer number or name). |
| ShowCustomerCard | Boolean |
Indicates whether to show the customer card if a selection is needed. |
| ShowCreateCustomerOption | Boolean |
Indicates whether to show the option to create a new customer. |
Returns
| Type | Description |
|---|---|
| Code[20] |
The found, selected, or created customer number. |
CreateNewCustomer
Creates a new customer with the specified name, optionally from a template, and displays the customer card.
procedure CreateNewCustomer(CustomerName: Text[100]; ShowCustomerCard: Boolean): Code[20]
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerName | Text[100] |
The name for the new customer. |
| ShowCustomerCard | Boolean |
Indicates whether to open the customer card after creation. |
Returns
| Type | Description |
|---|---|
| Code[20] |
The new customer number. |
SelectCustomer
Opens a customer lookup page for the user to select a customer.
procedure SelectCustomer(var Customer: Record Customer): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The selected customer record, or empty if cancelled. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if a customer was selected; otherwise, false. |
ToPriceSource
Initializes a price source record for this customer.
procedure ToPriceSource(var PriceSource: Record "Price Source")
Parameters
| Name | Type | Description |
|---|---|---|
| PriceSource | Table Microsoft.Pricing.Source."Price Source" |
Returns the initialized price source for sales pricing. |
OpenCustomerLedgerEntries
Opens the customer ledger entries page with optional filtering on due entries.
procedure OpenCustomerLedgerEntries(FilterOnDueEntries: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| FilterOnDueEntries | Boolean |
Indicates whether to filter on due entries only. |
SetInsertFromTemplate
Sets whether the customer is being inserted from a template.
procedure SetInsertFromTemplate(FromTemplate: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| FromTemplate | Boolean |
True if the customer is being created from a template; otherwise, false. |
IsLookupRequested
Checks if a lookup was requested during the last customer number search operation.
procedure IsLookupRequested(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if a lookup was requested; otherwise, false. |
IsContactUpdateNeeded
Checks if the associated contact record needs to be updated based on changed customer fields.
procedure IsContactUpdateNeeded(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if contact update is needed; otherwise, false. |
IsBlocked
Checks if the customer is blocked or privacy-blocked.
procedure IsBlocked(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the customer is blocked or privacy-blocked; otherwise, false. |
HasAnyOpenOrPostedDocuments
Checks if the customer has any open sales documents or posted ledger entries.
procedure HasAnyOpenOrPostedDocuments(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if open or posted documents exist; otherwise, false. |
CopyFromNewCustomerTemplate
Copies field values from the specified customer template to this customer record.
procedure CopyFromNewCustomerTemplate(CustomerTemplate: Record "Customer Templ.")
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerTemplate | Table Microsoft.Sales.Customer."Customer Templ." |
The customer template to copy values from. |
GetInsertFromContact
Gets whether the customer is being inserted from a contact record.
procedure GetInsertFromContact(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the customer is being created from a contact; otherwise, false. |
GetInsertFromTemplate
Gets whether the customer is being inserted from a template.
procedure GetInsertFromTemplate(): Boolean
Returns
| Type | Description |
|---|---|
| Boolean |
True if the customer is being created from a template; otherwise, false. |
VATRegistrationValidation
Validates the VAT registration number format and optionally verifies it against the VIES service.
procedure VATRegistrationValidation()
SetAddress
Sets the customer's address fields and updates the associated contact.
procedure SetAddress(CustomerAddress: Text[100]; CustomerAddress2: Text[50]; CustomerPostCode: Code[20]; CustomerCity: Text[30]; CustomerCounty: Text[30]; CustomerCountryCode: Code[10]; CustomerContact: Text[100])
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerAddress | Text[100] |
The primary address line. |
| CustomerAddress2 | Text[50] |
The secondary address line. |
| CustomerPostCode | Code[20] |
The postal code. |
| CustomerCity | Text[30] |
The city. |
| CustomerCounty | Text[30] |
The state, province, or county. |
| CustomerCountryCode | Code[10] |
The country/region code. |
| CustomerContact | Text[100] |
The contact name. |
FindByEmail
Finds a customer by email address, searching both the customer and contact records.
procedure FindByEmail(var Customer: Record Customer; Email: Text): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
Returns the found customer record. |
| Text |
The email address to search for. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if a customer was found; otherwise, false. |
UpdateReferencedIds
Updates all API-related reference IDs for currency, payment terms, shipment method, payment method, and tax area.
procedure UpdateReferencedIds()
GetReferencedIds
procedure GetReferencedIds(TempField: __MissingTypeSymbol__)
Parameters
| Name | Type | Description |
|---|---|---|
| TempField | __MissingTypeSymbol__ |
SetForceUpdateContact
Sets whether to force an update of the associated contact record regardless of field changes.
procedure SetForceUpdateContact(NewForceUpdateContact: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewForceUpdateContact | Boolean |
True to force contact update; otherwise, false. |
UpdateCurrencyId
Updates the Currency Id field based on the current Currency Code.
procedure UpdateCurrencyId()
UpdatePaymentTermsId
Updates the Payment Terms Id field based on the current Payment Terms Code.
procedure UpdatePaymentTermsId()
UpdateShipmentMethodId
Updates the Shipment Method Id field based on the current Shipment Method Code.
procedure UpdateShipmentMethodId()
UpdatePaymentMethodId
Updates the Payment Method Id field based on the current Payment Method Code.
procedure UpdatePaymentMethodId()
UpdateTaxAreaId
Updates the Tax Area ID based on the VAT Business Posting Group or Tax Area Code depending on tax type.
procedure UpdateTaxAreaId()
CheckAllowMultiplePostingGroups
Checks if multiple posting groups are allowed and validates that the customer has the required setting enabled.
procedure CheckAllowMultiplePostingGroups()
GetVATRegistrationNo
Gets the customer's VAT registration number.
procedure GetVATRegistrationNo(): Text[20]
Returns
| Type | Description |
|---|---|
| Text[20] |
The VAT registration number. |
GetShippedOutstandingInvoicesAmountLCY
Obsolete
This element will become obsolete from version 28.0. It is no longer used in GetTotalAmountLCYCommon procedure.
Gets the outstanding amount in LCY for shipped sales invoice lines.
[Obsolete(It is no longer used in GetTotalAmountLCYCommon procedure.,28.0)]
procedure GetShippedOutstandingInvoicesAmountLCY(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The outstanding amount in LCY for shipped invoices. |
GetShippedFromOrderLCYAmountLCY
Obsolete
This element will become obsolete from version 28.0. It is no longer used in GetTotalAmountLCYCommon procedure.
Gets the shipped but not invoiced amount in LCY from sales orders.
[Obsolete(It is no longer used in GetTotalAmountLCYCommon procedure.,28.0)]
procedure GetShippedFromOrderLCYAmountLCY(): Decimal
Returns
| Type | Description |
|---|---|
| Decimal |
The shipped but not invoiced amount in LCY. |
GetDefaultLocation
Gets the default location code based on ship-to address, customer location, and user setup.
procedure GetDefaultLocation(): Code[10]
Returns
| Type | Description |
|---|---|
| Code[10] |
The resolved location code. |
FormatVATRegistrationNo
procedure FormatVATRegistrationNo(VATRegistrationNo: Text; CountryCode: Code[10]): Text
Parameters
| Name | Type | Description |
|---|---|---|
| VATRegistrationNo | Text | |
| CountryCode | Code[10] |
Returns
| Type | Description |
|---|---|
| Text |
Events
OnBeforeIsContactUpdateNeeded
Raised before determining if the associated contact needs to be updated.
[IntegrationEvent(False,False)]
local procedure OnBeforeIsContactUpdateNeeded(Customer: Record Customer; xCustomer: Record Customer; var UpdateNeeded: Boolean; ForceUpdateContact: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The current customer record. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The previous customer record before changes. |
| UpdateNeeded | Boolean |
Set to true to indicate contact update is needed. |
| ForceUpdateContact | Boolean |
Indicates if contact update is being forced. |
OnAfterCopyFromNewCustomerTemplate
Raised after copying field values from a customer template to the customer record.
[IntegrationEvent(False,False)]
local procedure OnAfterCopyFromNewCustomerTemplate(var Customer: Record Customer; CustomerTemplate: Record "Customer Templ.")
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record that received template values. |
| CustomerTemplate | Table Microsoft.Sales.Customer."Customer Templ." |
The customer template that provided the values. |
OnAfterDeleteRelatedData
Raised after deleting all related data for the customer.
[IntegrationEvent(False,False)]
local procedure OnAfterDeleteRelatedData(Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record being deleted. |
OnAfterGetTopCustomerHeadlineQueryDocumentTypeFilter
Raised after getting the document type filter for the top customer headline query.
[IntegrationEvent(False,False)]
local procedure OnAfterGetTopCustomerHeadlineQueryDocumentTypeFilter(var DocumentTypeFilter: Text)
Parameters
| Name | Type | Description |
|---|---|---|
| DocumentTypeFilter | Text |
The document type filter text to modify. |
OnAfterHasAnyOpenOrPostedDocuments
Raised after checking if the customer has any open or posted documents.
[IntegrationEvent(False,False)]
local procedure OnAfterHasAnyOpenOrPostedDocuments(var Customer: Record Customer; var HasAnyDocs: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record being checked. |
| HasAnyDocs | Boolean |
Set to true if additional document types exist. |
OnAfterHasAddressIgnoreCountryCode
Raised after checking if the customer has address fields populated (excluding country/region).
[IntegrationEvent(False,False)]
local procedure OnAfterHasAddressIgnoreCountryCode(Customer: Record Customer; var Result: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record being checked. |
| Result | Boolean |
Set to true to indicate address exists. |
OnAfterHasDifferentAddress
Raised after comparing the customer's address with another customer.
[IntegrationEvent(False,False)]
local procedure OnAfterHasDifferentAddress(Customer: Record Customer; OtherCustomer: Record Customer; var Result: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record being compared. |
| OtherCustomer | Table Microsoft.Sales.Customer.Customer |
The other customer record to compare against. |
| Result | Boolean |
Set to true if addresses differ. |
OnAfterLookupCity
Raised after looking up the city from the post code table.
[IntegrationEvent(False,False)]
local procedure OnAfterLookupCity(var Customer: Record Customer; var PostCodeRec: Record "Post Code")
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| PostCodeRec | Table Microsoft.Foundation.Address."Post Code" |
The post code record used in the lookup. |
OnAfterLookupPostCode
Raised after looking up the post code.
[IntegrationEvent(False,False)]
local procedure OnAfterLookupPostCode(var Customer: Record Customer; xCustomer: Record Customer; var PostCodeRec: Record "Post Code")
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The previous customer record before changes. |
| PostCodeRec | Table Microsoft.Foundation.Address."Post Code" |
The post code record used in the lookup. |
OnAfterOnInsert
Raised after inserting a new customer record.
[IntegrationEvent(False,False)]
local procedure OnAfterOnInsert(var Customer: Record Customer; xCustomer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record that was inserted. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The customer record before insertion. |
OnAfterSetLastModifiedDateTime
Raised after setting the last modified date and time on the customer record.
[IntegrationEvent(False,False)]
local procedure OnAfterSetLastModifiedDateTime(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with updated timestamp. |
OnAfterValidateCity
Raised after validating the city field on the customer record.
[IntegrationEvent(False,False)]
local procedure OnAfterValidateCity(var Customer: Record Customer; xCustomer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record after city validation. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The customer record before city validation. |
OnAfterValidatePostCode
Raised after validating the post code field on the customer record.
[IntegrationEvent(False,False)]
local procedure OnAfterValidatePostCode(var Customer: Record Customer; xCustomer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record after post code validation. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The customer record before post code validation. |
OnAfterValidateShortcutDimCode
Raised after validating and saving a shortcut dimension code.
[IntegrationEvent(False,False)]
local procedure OnAfterValidateShortcutDimCode(var Customer: Record Customer; var xCustomer: Record Customer; FieldNumber: Integer; var ShortcutDimCode: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record after dimension validation. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The customer record before dimension validation. |
| FieldNumber | Integer |
The dimension field number that was validated. |
| ShortcutDimCode | Code[20] |
The dimension value code that was assigned. |
OnAssistEditOnBeforeExit
Raised before exiting the AssistEdit procedure after selecting a number series.
[IntegrationEvent(False,False)]
local procedure OnAssistEditOnBeforeExit(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with the new number series assigned. |
OnBeforeCheckBlockedCust
Raised before checking if a customer is blocked for documents or journals.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckBlockedCust(Customer: Record Customer; Source: Option; DocType: Option; Shipment: Boolean; Transaction: Boolean; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to check. |
| Source | Option |
The source type (Journal or Document). |
| DocType | Option |
The document type being checked. |
| Shipment | Boolean |
Indicates if this is a shipment operation. |
| Transaction | Boolean |
Indicates if this is a posting transaction. |
| IsHandled | Boolean |
Set to true to skip the default blocked check. |
OnBeforeCheckBlockedCustOnJnls
Raised before checking if a customer is blocked for journal lines.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckBlockedCustOnJnls(Customer: Record Customer; var GenJnlLine: Record "Gen. Journal Line"; Transaction: Boolean; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to check. |
| GenJnlLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
The general journal line being validated. |
| Transaction | Boolean |
Indicates if this is a posting transaction. |
| IsHandled | Boolean |
Set to true to skip the default blocked check. |
OnBeforeCheckIfOrderSalesLinesExist
Raised before checking if sales order lines exist for the customer.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckIfOrderSalesLinesExist(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to check. |
| IsHandled | Boolean |
Set to true to skip the default check. |
OnBeforeCreateNewCustomer
Raised before creating a new customer record.
[IntegrationEvent(False,False)]
local procedure OnBeforeCreateNewCustomer(CustomerName: Text[100]; ShowCustomerCard: Boolean; var NewCustomerCode: Code[20]; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerName | Text[100] |
The name for the new customer. |
| ShowCustomerCard | Boolean |
Indicates whether to show the customer card. |
| NewCustomerCode | Code[20] |
Set to the new customer code to override creation. |
| IsHandled | Boolean |
Set to true to skip the default creation logic. |
OnBeforeGetCustNoOpenCard
Raised before getting the customer number with card display options.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetCustNoOpenCard(CustomerText: Text; ShowCustomerCard: Boolean; var ShowCreateCustomerOption: Boolean; var CustomerNo: Code[20]; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| CustomerText | Text |
The text to search for. |
| ShowCustomerCard | Boolean |
Indicates whether to show the customer card. |
| ShowCreateCustomerOption | Boolean |
Indicates whether to show the create customer option. |
| CustomerNo | Code[20] |
Set to the customer number to override the lookup. |
| IsHandled | Boolean |
Set to true to skip the default lookup logic. |
OnBeforeCalcOverdueBalance
Raised before calculating the overdue balance.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalcOverdueBalance(var Customer: Record Customer; var OverdueBalance: Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| OverdueBalance | Decimal |
Set to the overdue balance to override the calculation. |
| IsHandled | Boolean |
Set to true to skip the default calculation. |
OnBeforeGetInvoicedPrepmtAmountLCY
Raised before getting the invoiced prepayment amount in local currency.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetInvoicedPrepmtAmountLCY(var Customer: Record Customer; var InvoicedPrepmtAmountLCY: Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| InvoicedPrepmtAmountLCY | Decimal |
Set to the amount to override the calculation. |
| IsHandled | Boolean |
Set to true to skip the default calculation. |
OnBeforeGetTotalAmountLCY
Raised before getting the total amount in local currency.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetTotalAmountLCY(var Customer: Record Customer; var TotalAmountLCY: Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| TotalAmountLCY | Decimal |
Set to the total amount to override the calculation. |
| IsHandled | Boolean |
Set to true to skip the default calculation. |
OnBeforeGetTotalAmountLCYUI
Raised before getting the total amount in local currency for UI display.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetTotalAmountLCYUI(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
OnBeforeGetTotalAmountLCYCommon
Raised before getting the common total amount in local currency calculation.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetTotalAmountLCYCommon(var Customer: Record Customer; var AdditionalAmountLCY: Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| AdditionalAmountLCY | Decimal |
Set to include additional amounts in the calculation. |
| IsHandled | Boolean |
Set to true to skip the default calculation. |
OnBeforeGetSalesLCY
Raised before getting the sales in local currency for the fiscal year.
[IntegrationEvent(False,False)]
local procedure OnBeforeGetSalesLCY(var Customer: Record Customer; var CustomerSalesYTD: Record Customer; var SalesLCY: Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| CustomerSalesYTD | Table Microsoft.Sales.Customer.Customer |
The customer record for year-to-date sales calculation. |
| SalesLCY | Decimal |
Set to the sales amount to override the calculation. |
| IsHandled | Boolean |
Set to true to skip the default calculation. |
OnBeforeInsert
Raised before inserting a new customer record.
[IntegrationEvent(False,False)]
local procedure OnBeforeInsert(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to be inserted. |
| IsHandled | Boolean |
Set to true to skip the default insert logic. |
OnBeforeLookupCity
Raised before looking up the city from the post code table.
[IntegrationEvent(False,False)]
local procedure OnBeforeLookupCity(var Customer: Record Customer; var PostCodeRec: Record "Post Code")
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| PostCodeRec | Table Microsoft.Foundation.Address."Post Code" |
The post code record for the lookup. |
OnBeforeLookupContactList
Raised before looking up the contact list for the customer.
[IntegrationEvent(False,False)]
local procedure OnBeforeLookupContactList(var Customer: Record Customer; var IsHandled: Boolean; FieldNumber: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| IsHandled | Boolean |
Set to true to skip the default lookup. |
| FieldNumber | Integer |
The field number that triggered the lookup. |
OnBeforeLookupPostCode
Raised before looking up the post code.
[IntegrationEvent(False,False)]
local procedure OnBeforeLookupPostCode(var Customer: Record Customer; var PostCodeRec: Record "Post Code")
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| PostCodeRec | Table Microsoft.Foundation.Address."Post Code" |
The post code record for the lookup. |
OnBeforeOpenCustomerLedgerEntries
Raised before opening customer ledger entries.
[IntegrationEvent(False,False)]
local procedure OnBeforeOpenCustomerLedgerEntries(var Customer: Record Customer; var DetailedCustLedgEntry: Record "Detailed Cust. Ledg. Entry"; FilterOnDueEntries: Boolean; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| DetailedCustLedgEntry | Table Microsoft.Sales.Receivables."Detailed Cust. Ledg. Entry" |
The detailed customer ledger entry record for filtering. |
| FilterOnDueEntries | Boolean |
Indicates whether to filter on due entries. |
| IsHandled | Boolean |
Set to true to skip the default open logic. |
OnBeforeOnDelete
Raised before deleting a customer record.
[IntegrationEvent(False,False)]
local procedure OnBeforeOnDelete(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to be deleted. |
| IsHandled | Boolean |
Set to true to skip the default delete logic. |
OnBeforeOnRename
Raised before renaming a customer record.
[IntegrationEvent(False,False)]
local procedure OnBeforeOnRename(var Customer: Record Customer; xCustomer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record being renamed. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The customer record before renaming. |
| IsHandled | Boolean |
Set to true to skip the default rename logic. |
OnBeforeSetDefaultSalesperson
Raised before setting the default salesperson for a new customer.
[IntegrationEvent(False,False)]
local procedure OnBeforeSetDefaultSalesperson(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| IsHandled | Boolean |
Set to true to skip the default salesperson assignment. |
OnBeforeTestNoSeries
Raised before testing the number series configuration.
[IntegrationEvent(False,False)]
local procedure OnBeforeTestNoSeries(var Customer: Record Customer; xCustomer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The previous customer record. |
| IsHandled | Boolean |
Set to true to skip the default number series test. |
OnBeforeUpdateDirectDebitPmtTermsCode
Raised before updating the payment terms code for direct debit.
[IntegrationEvent(False,False)]
local procedure OnBeforeUpdateDirectDebitPmtTermsCode(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| IsHandled | Boolean |
Set to true to skip the default update. |
OnBeforeValidateCity
Raised before validating the city field.
[IntegrationEvent(False,False)]
local procedure OnBeforeValidateCity(var Customer: Record Customer; var PostCodeRec: Record "Post Code"; CurrentFieldNo: Integer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| PostCodeRec | Table Microsoft.Foundation.Address."Post Code" |
The post code record for validation. |
| CurrentFieldNo | Integer |
The current field number being validated. |
| IsHandled | Boolean |
Set to true to skip the default validation. |
OnBeforeValidateVATRegistrationNo
Raised before validating the VAT registration number.
[IntegrationEvent(False,False)]
local procedure OnBeforeValidateVATRegistrationNo(var Customer: Record Customer; xCustomer: Record Customer; FieldNumber: Integer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The previous customer record. |
| FieldNumber | Integer |
The field number being validated. |
| IsHandled | Boolean |
Set to true to skip the default validation. |
OnBeforeValidatePostCode
Raised before validating the post code field.
[IntegrationEvent(False,False)]
local procedure OnBeforeValidatePostCode(var Customer: Record Customer; var PostCodeRec: Record "Post Code"; CurrentFieldNo: Integer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| PostCodeRec | Table Microsoft.Foundation.Address."Post Code" |
The post code record for validation. |
| CurrentFieldNo | Integer |
The current field number being validated. |
| IsHandled | Boolean |
Set to true to skip the default validation. |
OnBeforeValidateShortcutDimCode
Raised before validating a shortcut dimension code.
[IntegrationEvent(False,False)]
local procedure OnBeforeValidateShortcutDimCode(var Customer: Record Customer; var xCustomer: Record Customer; FieldNumber: Integer; var ShortcutDimCode: Code[20]; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The previous customer record. |
| FieldNumber | Integer |
The dimension field number. |
| ShortcutDimCode | Code[20] |
The dimension value code to validate. |
| IsHandled | Boolean |
Set to true to skip the default validation. |
OnBeforeVATRegistrationValidation
Raised before validating the VAT registration number format and VIES service.
[IntegrationEvent(False,False)]
local procedure OnBeforeVATRegistrationValidation(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| IsHandled | Boolean |
Set to true to skip the default VAT validation. |
OnGetCustNoOpenCardOnBeforeCustomerFindSet
Raised before the customer find set operation in GetCustNoOpenCard.
[IntegrationEvent(False,False)]
local procedure OnGetCustNoOpenCardOnBeforeCustomerFindSet(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to be searched. |
OnGetCustNoOpenCardOnBeforeFilterCustomer
Raised before filtering the customer in GetCustNoOpenCard.
[IntegrationEvent(False,False)]
local procedure OnGetCustNoOpenCardOnBeforeFilterCustomer(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to be filtered. |
OnGetCustNoOpenCardOnAfterSetCustomerFilters
Raised after setting customer filters in GetCustNoOpenCard.
[IntegrationEvent(False,False)]
local procedure OnGetCustNoOpenCardOnAfterSetCustomerFilters(var Customer: Record Customer; var CustomerFilterContains: Text)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with filters applied. |
| CustomerFilterContains | Text |
The filter text containing the search criteria. |
OnMarkCustomersWithSimilarNameOnBeforeCustomerFindSet
Raised before searching for customers with similar names.
[IntegrationEvent(False,False)]
local procedure OnMarkCustomersWithSimilarNameOnBeforeCustomerFindSet(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record to be searched. |
OnBeforeCheckCustomerContactRelation
Raised before checking the customer-contact business relation.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckCustomerContactRelation(Cont: Record Contact; ContBusRel: Record "Contact Business Relation"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cont | Table Microsoft.CRM.Contact.Contact |
The contact record. |
| ContBusRel | Table Microsoft.CRM.BusinessRelation."Contact Business Relation" |
The contact business relation record. |
| IsHandled | Boolean |
Set to true to skip the default check. |
OnBeforeValidateContact
Raised before validating the Contact field.
[IntegrationEvent(True,False)]
local procedure OnBeforeValidateContact(var IsHandled: Boolean; var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| IsHandled | Boolean |
Set to true to skip the default validation. |
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
OnBeforeValidateEmail
Raised before validating the email address field.
[IntegrationEvent(False,False)]
local procedure OnBeforeValidateEmail(var Customer: Record Customer; var IsHandled: Boolean; xCustomer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| IsHandled | Boolean |
Set to true to skip the default validation. |
| xCustomer | Table Microsoft.Sales.Customer.Customer |
The previous customer record. |
OnBeforeShowContact
Raised before executing the ShowContact procedure.
[IntegrationEvent(False,False)]
local procedure OnBeforeShowContact(var Customer: Record Customer; var ContactBusinessRelation: Record "Contact Business Relation")
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| ContactBusinessRelation | Table Microsoft.CRM.BusinessRelation."Contact Business Relation" |
The customer record. |
OnShowContactOnBeforeOpenContactCard
Raised before opening the contact card from ShowContact.
[IntegrationEvent(False,False)]
local procedure OnShowContactOnBeforeOpenContactCard(var Contact: Record Contact; var ContactPageID: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| Contact | Table Microsoft.CRM.Contact.Contact |
The contact record to display. |
| ContactPageID | Integer |
The page ID to use for displaying the contact. |
OnShowContactOnBeforeOpenContactList
Raised before opening the contact list from ShowContact.
[IntegrationEvent(False,False)]
local procedure OnShowContactOnBeforeOpenContactList(var Contact: Record Contact; var ContactPageID: Integer)
Parameters
| Name | Type | Description |
|---|---|---|
| Contact | Table Microsoft.CRM.Contact.Contact |
The contact record for the list. |
| ContactPageID | Integer |
The page ID to use for displaying the contact list. |
OnGetCustNoOpenCardOnAfterOnAfterCustomerFilterFromStart
Raised after applying the initial customer filter from start in GetCustNoOpenCard.
[IntegrationEvent(False,False)]
local procedure OnGetCustNoOpenCardOnAfterOnAfterCustomerFilterFromStart(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with the initial filter applied. |
OnGetCustNoOpenCardOnBeforeCustomerFindFirst
Raised before the Customer.FindFirst() operation after setting the name filter in GetCustNoOpenCard.
[IntegrationEvent(False,False)]
local procedure OnGetCustNoOpenCardOnBeforeCustomerFindFirst(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with applied filters. |
| IsHandled | Boolean |
Set to true to skip the FindFirst check and continue with alternative search logic. |
OnBeforeCustBlockedErrorMessage
Raised before displaying the customer blocked error message.
[IntegrationEvent(False,False)]
local procedure OnBeforeCustBlockedErrorMessage(Cust2: Record Customer; Transaction: Boolean; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Cust2 | Table Microsoft.Sales.Customer.Customer |
The blocked customer record. |
| Transaction | Boolean |
Indicates if this is a posting transaction. |
| IsHandled | Boolean |
Set to true to skip the default error message. |
OnBeforeCalcAvailableCreditCommon
Raised before calculating available credit.
[IntegrationEvent(False,False)]
local procedure OnBeforeCalcAvailableCreditCommon(var Rec: Record Customer; CalledFromUI: Boolean; var CreditLimitLCY: Decimal; var Result: Decimal; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Rec | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| CalledFromUI | Boolean |
Indicates if called from UI context. |
| CreditLimitLCY | Decimal |
The credit limit in local currency to use. |
| Result | Decimal |
Set to the result to override the calculation. |
| IsHandled | Boolean |
Set to true to skip the default calculation. |
OnGetBalanceAsVendorOnBeforeCalcBalance
Raised before calculating the balance from the linked vendor.
[IntegrationEvent(False,False)]
local procedure OnGetBalanceAsVendorOnBeforeCalcBalance(var Vendor: Record Vendor)
Parameters
| Name | Type | Description |
|---|---|---|
| Vendor | Table Microsoft.Purchases.Vendor.Vendor |
The linked vendor record. |
OnBeforeValidateRegistrationNumber
Raised before validating the registration number.
[IntegrationEvent(False,False)]
local procedure OnBeforeValidateRegistrationNumber(var Customer: Record Customer; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| IsHandled | Boolean |
Set to true to skip the default validation. |
OnBeforeCheckAllowMultiplePostingGroups
Raised before checking if multiple posting groups are allowed.
[IntegrationEvent(False,False)]
local procedure OnBeforeCheckAllowMultiplePostingGroups(var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| IsHandled | Boolean |
Set to true to skip the default check. |
OnGetCustNoOpenCardOnAfterMarkCustomersWithSimilarName
Raised after marking customers with similar names in GetCustNoOpenCard.
[IntegrationEvent(False,False)]
local procedure OnGetCustNoOpenCardOnAfterMarkCustomersWithSimilarName(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with marked similar names. |
OnGetTotalAmountLCYOnAfterCalcFields
Raised after calculating fields in GetTotalAmountLCY.
[IntegrationEvent(False,False)]
local procedure OnGetTotalAmountLCYOnAfterCalcFields(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with calculated fields. |
OnGetTotalAmountLCYUIOnAfterSetAutoCalcFields
Raised after setting auto-calculated fields in GetTotalAmountLCYUI.
[IntegrationEvent(False,False)]
local procedure OnGetTotalAmountLCYUIOnAfterSetAutoCalcFields(var Customer: Record Customer)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record with auto-calculated fields set. |
OnAfterGetTotalAmountLCYCommon
Raised after calculating the common total amount in local currency.
[IntegrationEvent(False,False)]
local procedure OnAfterGetTotalAmountLCYCommon(var Customer: Record Customer; var TotalAmountLCY: Decimal)
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| TotalAmountLCY | Decimal |
The calculated total amount that can be modified. |
OnAfterGetVATRegistrationNo
Raised after getting the VAT registration number.
[IntegrationEvent(False,False)]
local procedure OnAfterGetVATRegistrationNo(var Customer: Record Customer; var VATRegNo: Text[20])
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
The customer record. |
| VATRegNo | Text[20] |
The VAT registration number that can be modified. |