Codeunit 312 "Cust-Check Cr. Limit"
Base Application · Microsoft.Sales.Customer
Across versions
- BC23-24present
- BC256 procedures added, 3 procedures removed
- BC26unchanged
- BC273 events changed
- BC286 procedures removed, 3 events removed
- BC29-30unchanged
Neighbourhood 12 connected objects and pages
Base Application · Microsoft.Sales.Customer · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Permissions | TableData “My Notifications” = rimd |
Events published
OnNewCheckRemoveCustomerNotifications(RecId: RecordID; RecallCreditOverdueNotif: Boolean)(integration): Raises an event to remove existing customer credit and overdue notifications before sending new ones.- subscribers: Codeunit 1508 “Notification Lifecycle Handler” OnCustCheckCrLimitCheckRecallNotifs
OnBeforeGenJnlLineCheck(GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)(integration): Raised before checking the credit limit for a general journal line.OnBeforeSalesHeaderCheck(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var CreditLimitExceeded: Boolean)(integration): Raised before checking the credit limit for a sales header.OnBeforeCreateAndSendNotification(RecordId: RecordID; AdditionalContextId: Guid; Heading: Text[250]; NotificationToSend: Notification; var IsHandled: Boolean; var CustCheckCreditLimit: Page "Check Credit Limit")(integration): Raised before creating and sending a credit limit notification.OnBeforeSalesLineCheck(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var CreditLimitExceeded: Boolean)(integration): Raised before checking the credit limit for a sales line.OnSalesHeaderCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")(integration): Raised before showing the credit limit warning for a sales header.OnSalesLineCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")(integration): Raised before showing the credit limit warning for a sales line.OnServiceHeaderCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")Δ BC27 (integration, obsolete 27.0)OnServiceLineCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")Δ BC27 (integration, obsolete 27.0)OnServiceContractHeaderCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")Δ BC27 (integration, obsolete 27.0)OnBlanketSalesOrderToOrderCheckOnBeforeSalesHeaderShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")(integration): Raised before showing the credit limit warning when converting a blanket order to a sales order.OnBeforeBlanketSalesOrderToOrderCheck(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)(integration): Raised before checking the credit limit when converting a blanket order to a sales order.
Event subscriptions
- OnInitializingNotificationWithDefaultState subscribes to Page “My Notifications” OnInitializingNotificationWithDefaultState
Procedures
GenJnlLineCheck(GenJnlLine: Record "Gen. Journal Line"): Checks customer credit limit for a general journal line and sends notification if exceeded.SalesHeaderCheck(var SalesHeader: Record "Sales Header"): Boolean: Checks customer credit limit for a sales header and sends notification if exceeded.SalesLineCheck(SalesLine: Record "Sales Line"): Boolean: Checks customer credit limit for a sales line and sends notification if exceeded.GetInstructionType(DocumentType: Code[30]; DocumentNumber: Code[20]): Code[50]: Generates an instruction type code for credit limit checking based on document type and number.BlanketSalesOrderToOrderCheck(SalesOrderHeader: Record "Sales Header"): Checks customer credit limit when converting a blanket sales order to a sales order.ShowNotificationDetails(CreditLimitNotification: Notification): Displays the credit limit notification details page with information from the notification.GetCreditLimitNotificationId(): Guid: Retrieves the unique identifier for the credit limit notification.GetOverdueBalanceNotificationId(): Guid: Retrieves the unique identifier for the overdue balance notification.GetBothNotificationsId(): Guid: Retrieves the unique identifier for combined credit limit and overdue balance notifications.IsCreditLimitNotificationEnabled(Customer: Record Customer): Boolean: Checks if the credit limit notification is enabled for the specified customer.IsOverdueBalanceNotificationEnabled(Customer: Record Customer): Boolean: Checks if the overdue balance notification is enabled for the specified customer.GetCreditLimitNotificationMsg(): Text: Retrieves the message text displayed for credit limit notifications.GetOverdueBalanceNotificationMsg(): Text: Retrieves the message text displayed for overdue balance notifications.
Plus 1 local procedures.
Triggers
OnRun
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 1330 “Instruction Mgt.” (2 calls:
SalesHeaderCheck → IsEnabled,SalesLineCheck → IsEnabled) - Codeunit 1511 “Notification Lifecycle Mgt.” (1 call:
CreateAndSendNotification → SendNotificationWithAdditionalContext)
Called by
- Page 343 “Check Credit Limit” (7 calls:
ShowWarning → GetBothNotificationsId,ShowWarning → GetCreditLimitNotificationId,ShowWarning → GetCreditLimitNotificationMsg, …) - Page 6489 “Serv. Check Credit Limit” (7 calls:
ShowWarning → GetBothNotificationsId,ShowWarning → GetCreditLimitNotificationId,ShowWarning → GetCreditLimitNotificationMsg, …) - Codeunit 1508 “Notification Lifecycle Handler” (2 calls:
OnCustCheckCrLimitCheckRecallNotifs → GetCreditLimitNotificationId,OnCustCheckCrLimitCheckRecallNotifs → GetOverdueBalanceNotificationId) - Codeunit 6620 “Copy Document Mgt.” (2 calls:
CheckCreditLimit → SalesHeaderCheck,InitAndCheckSalesDocuments → SalesHeaderCheck) - Codeunit 87 “Blanket Sales Order to Order” (2 calls:
CreateSalesHeader → SalesHeaderCheck,OnRun → BlanketSalesOrderToOrderCheck) - Table 36 “Sales Header” (2 calls:
CheckCreditLimit → SalesHeaderCheck,CheckCreditMaxBeforeInsert → SalesHeaderCheck) - Page 42 “Sales Order” (1 call:
OnAfterGetCurrRecord → SalesHeaderCheck) - Table 37 “Sales Line” (1 call:
CheckCreditLimit → SalesLineCheck) - Table 81 “Gen. Journal Line” (1 call:
ValidateAmount → GenJnlLineCheck)
Deprecations
- procedure OnServiceContractHeaderCheckOnBeforeShowWarning: Pending 27.0 (#if not CLEAN27), “Moved to codeunit Serv. Check Credit Limit”
- procedure OnServiceHeaderCheckOnBeforeShowWarning: Pending 27.0 (#if not CLEAN27), “Moved to codeunit Serv. Check Credit Limit”
- procedure OnServiceLineCheckOnBeforeShowWarning: Pending 27.0 (#if not CLEAN27), “Moved to codeunit Serv. Check Credit Limit”
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: "Cust-Check Cr. Limit"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.