Codeunit "Cust-Check Cr. Limit"
Checks customer credit limits and overdue balances, sending notifications when thresholds are exceeded.
Properties
| Name | Value |
|---|---|
| Permissions | TableData "My Notifications" = rimd |
Methods
GenJnlLineCheck
Checks customer credit limit for a general journal line and sends notification if exceeded.
procedure GenJnlLineCheck(GenJnlLine: Record "Gen. Journal Line")
Parameters
| Name | Type | Description |
|---|---|---|
| GenJnlLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
Specifies the general journal line to check credit limit for. |
SalesHeaderCheck
Checks customer credit limit for a sales header and sends notification if exceeded.
procedure SalesHeaderCheck(var SalesHeader: Record "Sales Header"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" |
Specifies the sales header to check credit limit for. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the credit limit is exceeded, otherwise false. |
SalesLineCheck
Checks customer credit limit for a sales line and sends notification if exceeded.
procedure SalesLineCheck(SalesLine: Record "Sales Line"): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
Specifies the sales line to check credit limit for. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the credit limit is exceeded, otherwise false. |
GetInstructionType
Generates an instruction type code for credit limit checking based on document type and number.
procedure GetInstructionType(DocumentType: Code[30]; DocumentNumber: Code[20]): Code[50]
Parameters
| Name | Type | Description |
|---|---|---|
| DocumentType | Code[30] |
Specifies the document type code. |
| DocumentNumber | Code[20] |
Specifies the document number. |
Returns
| Type | Description |
|---|---|
| Code[50] |
The instruction type code for the credit limit check. |
BlanketSalesOrderToOrderCheck
Checks customer credit limit when converting a blanket sales order to a sales order.
procedure BlanketSalesOrderToOrderCheck(SalesOrderHeader: Record "Sales Header")
Parameters
| Name | Type | Description |
|---|---|---|
| SalesOrderHeader | Table Microsoft.Sales.Document."Sales Header" |
Specifies the sales order header created from the blanket order. |
ShowNotificationDetails
Displays the credit limit notification details page with information from the notification.
procedure ShowNotificationDetails(CreditLimitNotification: Notification)
Parameters
| Name | Type | Description |
|---|---|---|
| CreditLimitNotification | Notification |
Specifies the notification containing credit limit details. |
GetCreditLimitNotificationId
Retrieves the unique identifier for the credit limit notification.
procedure GetCreditLimitNotificationId(): Guid
Returns
| Type | Description |
|---|---|
| Guid |
The GUID identifier for the credit limit notification. |
GetOverdueBalanceNotificationId
Retrieves the unique identifier for the overdue balance notification.
procedure GetOverdueBalanceNotificationId(): Guid
Returns
| Type | Description |
|---|---|
| Guid |
The GUID identifier for the overdue balance notification. |
GetBothNotificationsId
Retrieves the unique identifier for combined credit limit and overdue balance notifications.
procedure GetBothNotificationsId(): Guid
Returns
| Type | Description |
|---|---|
| Guid |
The GUID identifier for both notifications combined. |
IsCreditLimitNotificationEnabled
Checks if the credit limit notification is enabled for the specified customer.
procedure IsCreditLimitNotificationEnabled(Customer: Record Customer): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
Specifies the customer record to check notification settings for. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the credit limit notification is enabled, otherwise false. |
IsOverdueBalanceNotificationEnabled
Checks if the overdue balance notification is enabled for the specified customer.
procedure IsOverdueBalanceNotificationEnabled(Customer: Record Customer): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Customer | Table Microsoft.Sales.Customer.Customer |
Specifies the customer record to check notification settings for. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the overdue balance notification is enabled, otherwise false. |
GetCreditLimitNotificationMsg
Retrieves the message text displayed for credit limit notifications.
procedure GetCreditLimitNotificationMsg(): Text
Returns
| Type | Description |
|---|---|
| Text |
The credit limit notification message text. |
GetOverdueBalanceNotificationMsg
Retrieves the message text displayed for overdue balance notifications.
procedure GetOverdueBalanceNotificationMsg(): Text
Returns
| Type | Description |
|---|---|
| Text |
The overdue balance notification message text. |
Events
OnNewCheckRemoveCustomerNotifications
Raises an event to remove existing customer credit and overdue notifications before sending new ones.
[IntegrationEvent(False,False)]
procedure OnNewCheckRemoveCustomerNotifications(RecId: RecordId; RecallCreditOverdueNotif: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| RecId | RecordId |
Specifies the record ID associated with the notifications to remove. |
| RecallCreditOverdueNotif | Boolean |
Specifies whether to recall credit and overdue notifications. |
OnBeforeGenJnlLineCheck
Raised before checking the credit limit for a general journal line.
[IntegrationEvent(False,False)]
local procedure OnBeforeGenJnlLineCheck(GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| GenJnlLine | Table Microsoft.Finance.GeneralLedger.Journal."Gen. Journal Line" |
The general journal line to check. |
| IsHandled | Boolean |
Set to true to skip the default credit limit check. |
OnBeforeSalesHeaderCheck
Raised before checking the credit limit for a sales header.
[IntegrationEvent(False,False)]
local procedure OnBeforeSalesHeaderCheck(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var CreditLimitExceeded: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" |
The sales header to check. |
| IsHandled | Boolean |
Set to true to skip the default credit limit check. |
| CreditLimitExceeded | Boolean |
Returns whether the credit limit is exceeded. |
OnBeforeCreateAndSendNotification
[IntegrationEvent(True,False)]
local procedure OnBeforeCreateAndSendNotification(RecordId: RecordId; AdditionalContextId: Guid; Heading: Text[250]; NotificationToSend: Notification; var IsHandled: Boolean; var CustCheckCreditLimit: Page "Check Credit Limit")
Parameters
| Name | Type | Description |
|---|---|---|
| RecordId | RecordId | |
| AdditionalContextId | Guid | |
| Heading | Text[250] | |
| NotificationToSend | Notification | |
| IsHandled | Boolean | |
| CustCheckCreditLimit | Page Microsoft.Sales.Customer."Check Credit Limit" |
OnBeforeSalesLineCheck
Raised before checking the credit limit for a sales line.
[IntegrationEvent(False,False)]
local procedure OnBeforeSalesLineCheck(var SalesLine: Record "Sales Line"; var IsHandled: Boolean; var CreditLimitExceeded: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesLine | Table Microsoft.Sales.Document."Sales Line" |
The sales line to check. |
| IsHandled | Boolean |
Set to true to skip the default credit limit check. |
| CreditLimitExceeded | Boolean |
Returns whether the credit limit is exceeded. |
OnSalesHeaderCheckOnBeforeShowWarning
[IntegrationEvent(False,False)]
local procedure OnSalesHeaderCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")
Parameters
| Name | Type | Description |
|---|---|---|
| CustCheckCreditLimit | Page Microsoft.Sales.Customer."Check Credit Limit" |
OnSalesLineCheckOnBeforeShowWarning
[IntegrationEvent(False,False)]
local procedure OnSalesLineCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")
Parameters
| Name | Type | Description |
|---|---|---|
| CustCheckCreditLimit | Page Microsoft.Sales.Customer."Check Credit Limit" |
OnServiceHeaderCheckOnBeforeShowWarning
Obsolete
This element will become obsolete from version 27.0. Moved to codeunit Serv. Check Credit Limit
[Obsolete(Moved to codeunit Serv. Check Credit Limit,27.0)]
[IntegrationEvent(False,False)]
local procedure OnServiceHeaderCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")
Parameters
| Name | Type | Description |
|---|---|---|
| CustCheckCreditLimit | Page Microsoft.Sales.Customer."Check Credit Limit" |
OnServiceLineCheckOnBeforeShowWarning
Obsolete
This element will become obsolete from version 27.0. Moved to codeunit Serv. Check Credit Limit
[Obsolete(Moved to codeunit Serv. Check Credit Limit,27.0)]
[IntegrationEvent(False,False)]
local procedure OnServiceLineCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")
Parameters
| Name | Type | Description |
|---|---|---|
| CustCheckCreditLimit | Page Microsoft.Sales.Customer."Check Credit Limit" |
OnServiceContractHeaderCheckOnBeforeShowWarning
Obsolete
This element will become obsolete from version 27.0. Moved to codeunit Serv. Check Credit Limit
[Obsolete(Moved to codeunit Serv. Check Credit Limit,27.0)]
[IntegrationEvent(False,False)]
local procedure OnServiceContractHeaderCheckOnBeforeShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")
Parameters
| Name | Type | Description |
|---|---|---|
| CustCheckCreditLimit | Page Microsoft.Sales.Customer."Check Credit Limit" |
OnBlanketSalesOrderToOrderCheckOnBeforeSalesHeaderShowWarning
[IntegrationEvent(False,False)]
local procedure OnBlanketSalesOrderToOrderCheckOnBeforeSalesHeaderShowWarning(var CustCheckCreditLimit: Page "Check Credit Limit")
Parameters
| Name | Type | Description |
|---|---|---|
| CustCheckCreditLimit | Page Microsoft.Sales.Customer."Check Credit Limit" |
OnBeforeBlanketSalesOrderToOrderCheck
Raised before checking the credit limit when converting a blanket order to a sales order.
[IntegrationEvent(False,False)]
local procedure OnBeforeBlanketSalesOrderToOrderCheck(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| SalesHeader | Table Microsoft.Sales.Document."Sales Header" |
The sales header created from the blanket order. |
| IsHandled | Boolean |
Set to true to skip the default credit limit check. |