Hi, Readers.
Today, I would like to briefly talk about how to manage credit limits (Warnings and Workflow) in Business Central.
Credit limits, balance amounts, and payment terms make it possible for Business Central to issue a credit and an overdue balance warning when you enter a sales order.
The Credit Limit field on a customer card specifies the maximum amount you allow the customer to exceed the payment balance before warnings are issued. When you enter information in journals, quotes, orders, and invoices, Business Central tests the header and lines to determine whether the document exceeds the credit limit.
You can post even if the credit limit exceeds. A blank field means there’s no credit limit for this customer.
Credit Limit
Specifies the maximum amount of credit that you extend to the customer for their purchases before you issue warnings. The value 0 represents unlimited credit.

For example,

Additionally, if the Balance exceeds the Credit Limit, it will be highlighted in red on the Customer Card.


You can choose not to receive warnings when the customer’s credit limit is exceeded, and you can specify which types of warnings you want to see. Let’s see more details.
Select Search (Alt+Q) in the upper-right corner, enter Sales & Receivables Setup, then choose the related link.

On the General FastTab, in the Credit Warnings field, choose the relevant option as described in the following table:
| Option | Description |
|---|---|
| Both Warnings | Both the Credit Limit and the Balance Due fields on the customer’s card are checked, and a warning is shown if the customer exceeds its credit limit or has an overdue balance. |
| Credit Limit | The value in the Credit Limit field on the customer’s card is compared with the customer’s balance, and a warning is shown if the customer’s balance exceeds this amount. |
| Overdue Balance | The Balance Due field on the customer’s card is checked, and a warning is shown if the customer has an overdue balance. |
| No Warning | No credit warnings are shown regarding the customer’s status. |

For example,

Clicking Show details brings up the Credit Limit Notification page for the details. It’s the exact same page either way, just with a different message at the top.
This customer has an overdue balance.

The customer’s credit limit has been exceeded.

Additionally, this notification can be disabled in the My Notifications.


To control Credit Limit amounts, we can just use standard Workflows out of the box.
The workflows can be designed to create requests for approval of a record field change while keeping the old data in case the request isn’t approved. The new value won’t be implemented until the last request is approved.

Customer Credit Limit Change Approval Workflow:


You can set a condition for when a field value changes: Credit Limit (LCY)

And revert the value of the Credit Limit (LCY) field on the record and save the change.

Let’s do a quick test.
Credit Limit (LCY) is Increased

Approver Type: Approver

Approval User Setup:

2000 -> 5000

An approval request has been sent. (Please note that the value will temporarily revert to its original value)

Switch back to the approver’s account, and you will find the record on the Requests to Approve page, displayed with the following details.

| To Approve | Details | Comment | Sender ID | Approval Due Date |
|---|---|---|---|---|
| Customer Card | Customer: 20000; Credit Limit (LCY) changed from 2,000 to 5,000 | ADELEV | 2026/08/26 |
Choose Open Record to open the original customer card. Once confirmed, click Approve to approve the details.

Returning to the Customer Card, you will see that the Credit Limit value has been updated.

One last question: as mentioned above, in standard BC, you can post even if the credit limit is exceeded. However, some clients require strict control to block posting when the credit limit is exceeded. How should this be handled? Unfortunately, as of right now this requires customization. Let me quickly share a workaround solution. The standard logic is located in the Codeunit below.
codeunit 312 “Cust-Check Cr. Limit”: Checks customer credit limits and overdue balances, sending notifications when thresholds are exceeded.

The following three methods are available. Note that these standard methods check Overdue Balance alongside Credit Limit. If you just want to check Credit Limit, we’ll need to build a new custom method.

For example,

Test code:
codeunit 50134 CreditLimitHandler
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", OnBeforePostSalesDoc, '', false, false)]
local procedure SalesPost_OnBeforePostSalesDoc(var SalesHeader: Record "Sales Header")
var
CustCheckCrLimit: Codeunit "Cust-Check Cr. Limit";
begin
if CustCheckCrLimit.SalesHeaderCheck(SalesHeader) then
Error('The customer %1 has exceeded the credit limit or has overdue invoices.', SalesHeader."Bill-to Customer No.");
end;
}
Done.

Great, give it a try!!!😁
END
Hope this will help.
Thanks for reading.
ZHU




コメント