---
id: object/codeunit/1950
type: object
title: Codeunit 1950 "LP Prediction Mgt."
summary: Codeunit 1950 "LP Prediction Mgt." in LatePaymentPredictor (Microsoft.Finance.Latepayment). 13 public procedures, 2 events, 1 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - latepaymentpredictor
versions:
  introduced: "29"
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: c90e4eb96613332b009d6169da4ace4f3a235b739f8c56de3ad4c1d4f2637a6a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/LatePaymentPredictor/app/src/LPPredictionMgt.Codeunit.al
    title: src/Apps/W1/LatePaymentPredictor/app/src/LPPredictionMgt.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 1950
name: LP Prediction Mgt.
namespace: Microsoft.Finance.Latepayment
app: LatePaymentPredictor
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 18
  events: 2
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 4
  called_by: 5
  implements: 0
---

# Codeunit 1950 "LP Prediction Mgt."

> Codeunit 1950 "LP Prediction Mgt." in LatePaymentPredictor (Microsoft.Finance.Latepayment). 13 public procedures, 2 events, 1 event subscribers. Introduced in BC29, still in BC30.

LatePaymentPredictor · Microsoft.Finance.Latepayment · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/LatePaymentPredictor/app/src/LPPredictionMgt.Codeunit.al) · facts from BC29

## Events published

- `OnAfterPredictIsLate(SelectedModel: Option; SalesHeader: Record "Sales Header"; Result: Boolean)` (integration)
  - subscribers: [Codeunit 1952 "LP Subscribers"](../codeunit/1952.md) SendTraceTagOnAfterPredictIsLate
- `OnAfterShowNotification()` (integration)
  - subscribers: [Codeunit 1952 "LP Subscribers"](../codeunit/1952.md) SendTraceTagOnAfterShowNotification

## Event subscriptions

- OnInitializingNotificationWithDefaultStateRegisterNotifs subscribes to Page "My Notifications" OnInitializingNotificationWithDefaultState

## Procedures

- `PredictLateShowResult(SalesHeader: Record "Sales Header")`
- `PredictIsLate(SalesHeader: Record "Sales Header"; LPMachineLearningSetup: Record "LP Machine Learning Setup"; var Confidence: Decimal): Boolean`
- `PredictIsLateAllPayments(SalesHeader: Record "Sales Header"; LPMachineLearningSetup: Record "LP Machine Learning Setup"; var LPMLInputData: Record "LP ML Input Data"): Boolean`
- `GetAzureMLCredentials(LPMachineLearningSetup: Record "LP Machine Learning Setup"; var ApiUri: Text[250]; var ApiKey: SecretText): Boolean`
- `GetDefaultTimeoutSeconds(): Integer`
- `ShowLatePaymentAdvertisement(SalesHeader: Record "Sales Header")`
- `IsEnabled(ShowSetup: Boolean): Boolean`
- `Enable(var Notification: Notification)`
- `LearnMore(var Notification: Notification)`
- `DisableNotification(var Notification: Notification)`
- `GetSetupNotificationId(): Guid`
- `GetConfidenceOptionFromConfidencePercent(Confidence: decimal): Option " ",Low,Medium,High`
- `GetConfidenceOptionTextFromConfidencePercent(Confidence: decimal): Text`

Plus 2 local procedures.

## 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 2003 "ML Prediction Management"](../codeunit/2003.md) (6 calls: `PredictIsLate → Initialize`, `PredictIsLate → InitializeWithKeyVaultCredentials`, `PredictIsLate → Predict`, …)
- [Codeunit 1954 "LP Feature Table Helper"](../codeunit/1954.md) (2 calls: `PredictIsLate → ResetAndFillFeaturesTable`, `PredictIsLateAllPayments → ResetAndFillFeaturesTable`)
- [Codeunit 1951 "LP Model Management"](../codeunit/1951.md) (1 call: `PredictLateShowResult → IsMachineLearningInProgress`)
- [Page 1950 "LP Machine Learning Setup"](../page/1950.md) (1 call: `IsEnabled → (object)`)

## Called by

- [Codeunit 1951 "LP Model Management"](../codeunit/1951.md) (4 calls: `InvokeShowModelFromUi → GetAzureMLCredentials`, `InvokeShowModelFromUi → GetDefaultTimeoutSeconds`, `PrepareForML → GetAzureMLCredentials`, …)
- [Codeunit 1957 "LPP Update"](../codeunit/1957.md) (2 calls: `OnRun → GetConfidenceOptionFromConfidencePercent`, `OnRun → PredictIsLateAllPayments`)
- [Codeunit 1952 "LP Subscribers"](../codeunit/1952.md) (1 call: `ShowLatePaymentAdvertisement → ShowLatePaymentAdvertisement`)
- [Page extension 1958 "LPP Customer Ledger Entries"](../pageextension/1958.md) (1 call: `OnOpenPage → IsEnabled`)
- [Page extension 1959 "LP Activities"](../pageextension/1959.md) (1 call: `OnOpenPage → IsEnabled`)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## 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: "codeunit", object_name: "LP Prediction Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
