How-toEpicor KineticBPM / Customization

Epicor BPM InfoMessage, Message Box, Throw Exception and Hold

Question
epicor bpm infomessage

Also searched as

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

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.

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

How to give feedback or stop a transaction from a BPM

  1. 1Open 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.
  2. 2Decide 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.
  3. 3Open 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.
  4. 4For 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.
  5. 5For 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.
  6. 6For 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.
  7. 7Save, 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.
  8. 8If it does not fire or errors, turn on tracing (Tracing Options in the client) and read the BPM section of the server trace log.

InfoMessage versus message box versus exception

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

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.

// 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

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

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.

Try it here, free

Epicor Kinetic BPM Directive Inventory Worksheet

Open full tool

An editable register of your Epicor directives with owner, purpose, risk score and review date, exportable to Excel.

Common 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.

How an ERP-grounded AI assistant handles this

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.

Frequently asked questions

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

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?

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?

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?

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.

Related

Error fix

Fixing Epicor BusinessObjectException: BPM Directive Errors

A BusinessObjectException that says "A Business Process Management (BPM) directive has raised the following error" means a directive on that business object stopped the transaction, either deliberately via a Raise Exception widget or accidentally via an unhandled .NET error in Custom Code. Expand the InnerException on the error dialog to see the real message and the directive name, then open BPM Designer for that object and method to find the widget that fired.

How-to

How to Create a BPM Method Directive in Epicor Kinetic

In Epicor Kinetic, open Business Process Management > Method Directive Maintenance (the BPM Workbench), pick the business object and method, choose Pre-Processing, Base Processing or Post-Processing, then add a condition and actions such as Show Message or Set Field. Enable it and test in a pilot company before production.

Advanced

How to create and call an Epicor Function

Open Function Studio from the main menu (Customization > Function Studio) or from inside a BPM designer's Call Context widget, define a Library and Function with typed inputs/outputs, write the logic in the C# widget, then compile and test with the built-in test harness before calling it from a BPM directive, a dashboard, or another function.

How-to

Epicor BPM Send Email: Widget, Function and SMTP Setup

To send email from an Epicor Kinetic BPM or Epicor Function, make sure the server SMTP settings work, then add a Send Email widget to the directive or function and fill the To, Subject, Body and optional attachment. Test the SMTP path first with a standard email-producing action, because most failures are server mail settings, not the widget.

How-to

Fixing a Slow Epicor BAQ (Business Activity Query)

A slow BAQ in Epicor is usually caused by unindexed join columns, a subquery or calculated field forcing a table scan, or the BAQ pulling far more rows than the dashboard actually displays before filtering client-side. Fix it by reading the SQL Server execution plan Epicor generates, moving filters into the BAQ criteria instead of the dashboard filter panel, and replacing subqueries with joins where possible.

How-to

Epicor MRP Runs but Generates No Suggestions

When Epicor's MRP process completes without a job or purchase suggestion for a part you expect one for, the cause is almost always the part's own configuration (Part Class Type, Make Direct, Non-MRP flag, planning Time Fence) or the demand not being linked in a way MRP recognizes, not a defect in the MRP engine. Work through the part's Planning tab, its safety stock and lead time setup, and the demand source (sales order line status, job material requirement) before assuming the run itself failed.

AI for ERP

AI for Epicor Kinetic, Beyond What Prism Covers

Add AI to Epicor Kinetic beyond Prism: private LLM over BAQs, BPM data, and REST v2, on-prem or private cloud, with honest guidance on when Prism already covers you.

AI for ERP

Private AI for Epicor Kinetic Cloud, Outside the Multi-Tenant Boundary

Run a private LLM on Epicor Kinetic private cloud or Kinetic Cloud data via BAQs, REST v2 and Data Fabric, keeping sensitive manufacturing data off shared AI.

Stuck on Epicor Kinetic?

Talk to engineers who work inside Epicor Kinetic every week, and who build private AI that answers these questions from your own ERP data.

Keep exploring

Free tools

ERP fixes and how-tos

Guides

AI on your ERP

Integrations

Comparisons

Software