---
title: "Codeunit 1302 Customer Mgt., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/points/
object: https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 1302 Customer Mgt., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/points/

31 procedures and triggers with a step in src/Layers/W1/BaseApp/Sales/Customer/CustomerMgt.Codeunit.al, in source order, read from the text, not from a run.

## AvgDaysToPay

[Line 35](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L35).

- [39](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L39) calls `CalculatePaymentStats`
- [40](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L40) calls `GetAvgDaysToPay`

## GetAvgDaysToPay

[Line 43](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L43), local.

- [48](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L48) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetAvgDaysToPayLabel`

## CalculatePaymentStats

[Line 58](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L58).

- [72](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L72) calls `SetFilterForPostedDocs`
- [106](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L106) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetAvgDaysToPayLabel`
- [107](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L107) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetPaidLateCountLabel`
- [108](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L108) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetPaidOnTimeCountLabel`
- [109](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L109) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetPercentPaidLateLabel`
- [114](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L114) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetOverdueCountLabel`
- [116](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L116) calls `CalcLastPaymentInfo`
- [123](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L123) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetDaysSinceLastSaleLabel`

## CalcLastPaymentInfo

[Line 131](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L131).

- [143](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L143) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetLastPaymentDateLabel`
- [144](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L144) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetLastPaymentAmountLabel`
- [147](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L147) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetLastPaymentOnTimeLabel`

## CalcNumberOfDistinctItemsSold

[Line 156](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L156).

- [168](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L168) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetDistinctItemsSoldLabel`

## CalculateInteractionStats

[Line 176](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L176).

- [188](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L188) calls `GetCurrentYearFilter`
- [199](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L199) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetInteractionCountLabel`
- [201](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L201) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetLastInteractionDateLabel`
- [203](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L203) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetLastInteractionTypeLabel`
- [204](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L204) calls [Codeunit 32 Customer Card Calculations](https://jonas-paprotka.de/ref/codeunit/32-customer-card-calculations/) `GetMostFrequentInteractionTypeLabel`

## CalculateStatistic

[Line 220](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L220).

- [222](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L222) calls `GetCurrentYearFilter`
- [225](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L225) calls `CalculateStatisticsWithCurrentCustomerValues`

## CalculateStatisticsWithCurrentCustomerValues

[Line 239](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L239).

- [245](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L245) raises `OnBeforeCalculateStatisticsWithCurrentCustomerValues`, IsHandled
- [251](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L251) calls [Codeunit 5836 Cost Calculation Management](https://jonas-paprotka.de/ref/codeunit/5836-cost-calculation-management/) `NonInvtblCostAmt`
- [252](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L252) calls [Codeunit 5836 Cost Calculation Management](https://jonas-paprotka.de/ref/codeunit/5836-cost-calculation-management/) `CalcCustActualCostLCY`

## CalcAmountsOnPostedInvoices

[Line 272](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L272).

- [276](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L276) calls `CalcAmountsOnPostedDocs`

## CalcAmountsOnPostedCrMemos

[Line 285](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L285).

- [289](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L289) calls `CalcAmountsOnPostedDocs`

## CalcAmountsOnOrders

[Line 298](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L298).

- [302](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L302) calls `CalculateAmountsOnUnpostedDocs`

## CalcAmountsOnQuotes

[Line 311](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L311).

- [315](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L315) calls `CalculateAmountsOnUnpostedDocs`

## CalcAmountsOnPostedDocs

[Line 318](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L318), local.

- [323](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L323) calls `SetFilterForPostedDocs`

## CalculateAmountsWithVATOnUnpostedDocuments

[Line 334](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L334).

- [342](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L342) calls `SetFilterForUnpostedLines`
- [346](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L346) calls `SetFilterForUnpostedLines`

## CalculateAmountsOnUnpostedInvoices

[Line 359](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L359).

- [363](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L363) calls `CalculateAmountsOnUnpostedDocs`

## CalculateAmountsOnUnpostedCrMemos

[Line 372](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L372).

- [376](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L376) calls `CalculateAmountsOnUnpostedDocs`

## DrillDownOnPostedInvoices

[Line 417](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L417).

- [423](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L423) calls `GetCurrentYearFilter`
- [425](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L425) runs [Page 143 Posted Sales Invoices](https://jonas-paprotka.de/ref/page/143-posted-sales-invoices/)

## DrillDownOnPostedCrMemo

[Line 432](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L432).

- [438](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L438) calls `GetCurrentYearFilter`
- [440](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L440) runs [Page 144 Posted Sales Credit Memos](https://jonas-paprotka.de/ref/page/144-posted-sales-credit-memos/)

## DrillDownOnOrders

[Line 447](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L447).

- [455](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L455) runs [Page 9305 Sales Order List](https://jonas-paprotka.de/ref/page/9305-sales-order-list/)

## DrillDownOnQuotes

[Line 462](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L462).

- [470](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L470) runs [Page 9300 Sales Quotes](https://jonas-paprotka.de/ref/page/9300-sales-quotes/)

## DrillDownMoneyOwedExpected

[Line 477](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L477).

- [482](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L482) calls `SetFilterForUnpostedDocs`
- [483](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L483) runs [Page 45 Sales List](https://jonas-paprotka.de/ref/page/45-sales-list/)

## DrillDownOnUnpostedInvoices

[Line 490](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L490).

- [495](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L495) calls `SetFilterForUnpostedDocs`
- [496](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L496) runs [Page 9301 Sales Invoice List](https://jonas-paprotka.de/ref/page/9301-sales-invoice-list/)

## DrillDownOnUnpostedCrMemos

[Line 503](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L503).

- [508](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L508) calls `SetFilterForUnpostedDocs`
- [509](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L509) runs [Page 9302 Sales Credit Memos](https://jonas-paprotka.de/ref/page/9302-sales-credit-memos/)

## SetFilterForUnpostedDocs

[Line 512](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L512), local.

- [515](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L515) calls `GetCurrentYearFilter`

## SetFilterForUnpostedLines

[Line 523](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L523), local.

- [527](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L527) calls `GetCurrentYearFilter`
- [531](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L531) raises `OnAfterSetFilterForUnpostedLines`

## SetFilterForPostedDocs

[Line 534](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L534), local.

- [537](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L537) calls `GetCurrentYearFilter`
- [540](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L540) raises `OnAfterSetFilterForPostedDocs`

## GetCurrentYearFilter

[Line 547](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L547).

- [554](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L554) raises `SkipSettingFilter`
- [559](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L559) calls [Codeunit 358 DateFilter-Calc](https://jonas-paprotka.de/ref/codeunit/358-datefilter-calc/) `CreateAccountingPeriodFilter`
- [561](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L561) calls [Codeunit 358 DateFilter-Calc](https://jonas-paprotka.de/ref/codeunit/358-datefilter-calc/) `CreateFiscalYearFilter`

## GetTotalSales

[Line 571](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L571).

- [585](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L585) raises `OnBeforeGetTotalSales`, IsHandled
- [589](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L589) calls `CalcAmountsOnPostedInvoices`
- [590](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L590) calls `CalcAmountsOnPostedCrMemos`
- [592](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L592) calls `CalculateAmountsOnUnpostedInvoices`
- [593](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L593) calls `CalculateAmountsOnUnpostedCrMemos`

## GetYTDSales

[Line 604](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L604).

- [609](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L609) calls `GetTotalSales`

## SearchForExternalDocNo

[Line 620](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L620).

- [628](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L628) raises `OnBeforeSearchForExternalDocNo`, IsHandled

## CalculateShipBillToOptions

[Line 664](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L664).

- [672](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L672) calls [Table 36 Sales Header](https://jonas-paprotka.de/ref/table/36-sales-header/) `ShipToAddressEqualsSellToAddress`
- [674](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L674) calls [Table 36 Sales Header](https://jonas-paprotka.de/ref/table/36-sales-header/) `ShipToAddressEqualsSellToAddress`
- [681](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L681) calls [Table 36 Sales Header](https://jonas-paprotka.de/ref/table/36-sales-header/) `BillToAddressEqualsSellToAddress`
- [683](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L683) calls [Table 36 Sales Header](https://jonas-paprotka.de/ref/table/36-sales-header/) `BillToAddressEqualsSellToAddress`
- [689](https://jonas-paprotka.de/ref/codeunit/1302-customer-mgt/source/#L689) raises `OnAfterCalculateShipBillToOptions`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
