2026-11-27

Sage 100: Script to Change the Credit Warning Message

Sage 100 shows "over credit limit" even when a customer is only past due. There is no setting to reword it — here is how to add a Customizer script that shows the accurate message.

Sage 100 fires the same "customer over credit limit" warning whether the customer is genuinely over their limit or simply past due. The documented example is painful: a customer with a $25,000 limit and one open invoice for $200 — 30 days late — triggered the over-limit message, and the order desk burned time hunting for a limit problem that did not exist.

First, the fact that shapes the solution: there is no setting that rewords the built-in warning. No source describes one. The working approach is additive — a small Customizer (user-defined) script that evaluates the customer's real position and pops up its own accurate message: on hold, past due, or actually over the limit. The method below is the one experienced Sage 100 scripters describe for exactly this request; the message logic is yours to write to your own credit rules, because no drop-in script for this exact three-way warning has been published.

The fix

  1. Pick the trigger point. Two documented options:
    • Panel script: the credit-warning panel in order/invoice entry can carry a script. In Customizer, find the panel and add a script trigger to it.
    • Table event script (the pattern a working implementation uses): attach the script to SO_SalesOrderHeader, field CustomerNo, event Column Post-Validate, so the check runs the moment the customer is entered on a new order.
  2. Write the script as a text file and save it under MAS90\CM\Script\. In Customizer, point the trigger at that text file. Event scripts are VBScript — that is the only language option for event scripts (button scripts are more flexible, but this is not a button).
  3. Get the customer record from the order, not by reopening it. Use the order object's child handle for CustomerNo to reach the customer record already loaded for the order. From it, read the values your message needs — the credit limit (CreditLimit), the current balance (CurrentBalance), and the aging category balances that tell you how much is past due and by how far.
  4. Apply your rules in a sensible order, for example:
    • If the customer is on credit hold, say exactly that.
    • Else, if the past-due aging balance is beyond your threshold (the requesting site used 15+ days past due), say the account is past due — and name the amount.
    • Else, if AR balance plus open orders exceeds the credit limit, say the account is over its limit — and show the limit and the combined total, so the desk can see why.
    • If none apply, show nothing. A pop-up on every clean order trains staff to click through the real ones.
  5. Display the message with Sage's own message box, never VBScript's MsgBox: retVal = oSession.AsObject(oSession.UI).MessageBox("", sMsg) On Sage 100 Advanced and Premium, scripts execute on the server. A plain MsgBox opens on the server, where nobody can click it, and the user's session hangs. This is the single most common way a beginner's credit script freezes the system.

  6. Guard the script. Wrap it so it only runs where you intend:

    • oSession.UI <> 0 — only when there is a screen; this keeps it out of Visual Integrator imports and other background processes.
    • An EditState check (new orders only) if you do not want it firing on existing orders.
    • An oSession.CompanyCode check for your test company while you develop, so the script cannot touch live work until you remove the guard.
  7. Compile and test. Accept your way out of Customizer and click Compile when prompted. Compiling converts your text file into the VBScript the program calls (each script becomes a sub, protected by a checksum — you cannot edit the compiled file directly; change the text file and recompile). Re-open the entry screen so the new script loads, then test all four cases: on hold, past due only, over limit, and clean.

Options and approaches

Panel script vs table event script

The panel script sits closest to the native warning and fires in that entry context. The CustomerNo Post-Validate event fires earlier — as soon as the customer is chosen — which most order desks prefer, because the accurate warning arrives before lines are keyed, not after. The event approach is also the one with a working implementation on record, including the open-orders-against-limit test and a variant that warns at 90% of the limit instead of only past it.

Learning the scripting basics

The thread's pointers for a first-time scripter: Sage KB carries a scripting article, a Sage developer's scripting guide circulates on the Sage Community Hub, and Sage U offers a short (~23-minute) introductory scripting course. Reading values off a business object and showing a message is one of the safest first scripts to attempt — it changes no data.

What doesn't work

  • Hunting for a setting to edit the native message text. There isn't one documented anywhere; the script supplements the warning, it does not rewrite Sage's.
  • Using VBScript MsgBox for the pop-up. On Advanced/Premium it opens on the server and freezes the session (see step 5).
  • Editing the compiled VBS file by hand. The checksum rejects it. All changes go through the text file in MAS90\CM\Script and a recompile in Customizer.
  • Letting the script fire during imports. An unguarded pop-up triggered by a server-side process (an import, a scheduled task) has no screen to land on. The oSession.UI guard in step 6 is not optional decoration.

Affected versions

Requested and discussed on Sage 100 v2019; the Customizer script-trigger and compile mechanism, and the server-side MessageBox rule for Advanced/Premium, are long-standing Sage 100 behaviour and are described generically in the sources. The corroborating working implementation is not pinned to a version in the material available — test in a copy company on your own version before rolling it out.

Prevention / best practice

  • Develop and test every script in a test company first, behind a CompanyCode guard, and only promote it to live once all message cases have been exercised.
  • Keep the message factual: state the condition and the numbers (limit, balance, past-due amount). The whole point of the script is that staff stop investigating the wrong problem.
  • Decide your past-due threshold as a credit policy (the requesting site chose 15 days) and document it in the script header, so the next person knows why the number is what it is.

Related help

Still stuck? Send us a screenshot of the error, we will diagnose it for free.

Digit Masters has supported Sage 100 and Sage 300 since 1997. Send the screenshot through our contact page or to contact@digitmasters.com, or call (800) 965-4262.

Ready to Optimize Your Sage ERP?

Speak with a CPA-led Sage consultant. Free initial consultation — English or Chinese.

Get a Free Consultation