# Epicor BPM InfoMessage, Message Box, Throw Exception and Hold

> Source: https://netray.co/erp-help/epicor-bpm-infomessage-message-box-throw-exception-hold
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

In Epicor Kinetic BPM, a message to the user is either a non-blocking InfoMessage (a Show Message widget, or PublishInfoMessage in custom code) or a blocking exception (a Raise Exception widget, or a thrown BLException) that cancels the save. A hold is not a separate message type: you set the relevant hold flag on the record in a Data or Method directive and optionally tell the user why.

## Kind

how-to

## System

epicor

## Erp

Epicor Kinetic

## Module

BPM / Customization

## Query

epicor bpm infomessage

## Alternate Queries

- epicor bpm message box
- epicor bpm throw exception
- epicor bpm hold
- bpm runtime error in epicor
- epicor 2024.1 bpm condition widget

## Applies To

Epicor Kinetic 2021 and later (widget names shift slightly by release; the condition widget layout changed in 2024.1), Method, Data and Base Processing directives

## Steps

### How to give feedback or stop a transaction from a BPM

**Items:**

Open BPM Method Directive Maintenance (or Data Directive Maintenance for table-level rules) and create or open the directive on the right business object and method, for example SalesOrder.Update in the Post-Processing or Pre-Processing section.

Decide the intent: a warning the user can ignore (InfoMessage), or a hard stop that rolls back the save (exception). Pre-Processing is where you stop things; Post-Processing is where you inform.

Open the Designer and add a Condition widget first so the message only fires when your rule is true, for example a changed field, a credit limit comparison or a missing value on the ttTable row.

For a non-blocking message add a Show Message widget on the true branch, set the message type (Information, Warning), and type or build the text with variables.

For a blocking message add a Raise Exception widget on the true branch with the text the user must read. The method stops and the transaction is rolled back.

For a hold, add a Set Field widget (or custom code) that updates the hold field on the row being saved, such as the order hold flag, then add a Show Message widget explaining it.

Save, set the directive to Enabled, and in Directive Group Maintenance make sure the group is active. Test as a real user in the right company and site.

If it does not fire or errors, turn on tracing (Tracing Options in the client) and read the BPM section of the server trace log.

## Sections

### InfoMessage versus message box versus exception

**Body:**

An InfoMessage is a message the server attaches to the response. The method completes and the data is saved, and the client shows the message afterwards. In the designer this is the Show Message widget. It is the right choice for "credit limit is close" or "this part is obsolete" because the user is informed without losing work.

An exception is different in kind. It aborts the call, rolls back the transaction and surfaces as the BusinessObjectException that users see. If you want to prevent a save, use an exception, not a message. A message box in a customization (Application Studio, form events) is a client-side dialog and is separate from BPM, which runs on the server. Mixing them up is the most common reason a rule seems to run but the user is not stopped.

### Doing the same in custom code

**Body:**

If you use a Custom Code widget or a code block in a function, the same two behaviours are available. PublishInfoMessage queues a message without stopping, while throwing Ice.BLException cancels the call. Pass the table and field name to PublishInfoMessage so the client can associate the message with a column.

Prefer widgets for simple conditions. They are readable by non-developers and survive upgrades with less risk. Use code when you need loops over the ttTable rows or a string you cannot build with the expression editor.

**Code:**

// Non-blocking message
this.PublishInfoMessage("Order is over the customer credit limit.",
  Ice.Common.BusinessObjectMessageType.Warning,
  Ice.Bpm.InfoMessageDisplayMode.Individual,
  "OrderHed", "OrderNum");

// Blocking: rolls back the save
throw new Ice.BLException("Ship via is required before the order can be saved.");

### Holds and the condition widget

**Body:**

Epicor has several hold concepts: order hold, credit hold on the customer, job hold, and shipping or release holds. In BPM you do not call a generic hold function. You set the field that represents the hold for that object, then let standard logic treat the record as held. Check the field name on the actual table in the Directive designer's table list before you write the rule.

The Condition widget evaluates fields, arguments and variables with comparison and logical operators. In 2024.1 and later the condition builder was reworked, so older screenshots in forum posts may not match what you see. The logic is the same: combine conditions, then route a true and a false branch. Always handle the false branch deliberately, even if it does nothing.

### Debugging a BPM runtime error

**Body:**

A BPM runtime error is almost always one of four things: a null reference because the ttTable has no rows for that call, a cast or type problem in an expression, a field referenced that does not exist on that method's dataset, or a directive that runs in an unexpected place (for example it also fires for an integration or a DMT load).

Use the Tracing Options in the client to log BPM activity, reproduce once, and read the server trace log. Guard row access with an ExistsRow style condition before reading values. Test the directive with a user whose company, site and security match production, because a rule that works for an admin can fail for a restricted user.

## Pitfalls

- Using Raise Exception in Post-Processing: the data is already committed in many flows, so the user sees an error but the change may have been applied.
- Showing a message from a Data Directive and expecting the user to see it: Data Directives run at table level, so use a Method Directive for user-facing text.
- Forgetting to enable the directive and its Directive Group, so the rule silently never runs.
- Reading ttTable fields without checking a row exists, which throws a runtime error on empty calls.
- Hardcoding a company or site in the condition when the directive is shared across several plants.

## Ai Angle

An assistant grounded in your Epicor instance can list which directives are enabled on a given method, show the exact field names on the dataset, and draft the condition and message text for review. With ERPray you can ask why a particular order was held and see the query behind the answer. Anything that changes a directive stays a human-approved change in a test company first.

## Faq

### How do I show a warning without stopping the save in Epicor BPM?

**Answer:** Use a Show Message widget (an InfoMessage) in a Post-Processing Method Directive, or call PublishInfoMessage in custom code. The method completes and saves, then the client displays the message. Use Raise Exception only when the user must not continue.

### Why does my Epicor BPM exception not roll back the change?

**Answer:** Most likely the exception is raised in Post-Processing or in a directive on a different method than the one that wrote the data. Move the check to Pre-Processing on the method being called, or to a Data Directive on the table, so the transaction is still open when it throws.

### Can a BPM put an order on hold?

**Answer:** Yes, by setting the hold field on the record in a Pre-Processing Method Directive or a Data Directive, then showing a message to explain it. There is no single generic hold widget, so confirm the field on the table you are saving.

### What changed with the condition widget in 2024.1?

**Answer:** The condition builder interface was reworked, so screenshots from older versions may not match. The concept is unchanged: build the condition, then use the true and false branches. Check the release notes for your exact version.

## Search terms

epicor bpm infomessage, epicor bpm message box, epicor bpm throw exception, epicor bpm hold, epicor bpm raise exception, epicor bpm show message widget, epicor bpm condition widget, epicor bpm runtime error, epicor PublishInfoMessage, epicor kinetic bpm

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
