Skip to Main Content
Feature Request FR-4544
Product Area APIs
Status CLOSED

2 Voters

Alternative to APEX_ERROR.ADD_ERROR - without implicit rollback

mark.w Public
· Jul 7 2025

Idea Summary
APEX_ERROR.ADD_ERROR seems to trigger a"hidden" rollback later in the process. So it cannot (or should not) be used for processes which can be "partially successful", like processing a batch of changes. 

It would be useful to be able to add messages (including errors but possibly also success messages) to be displayed in APEX, but without impacting the transaction.

Preferred Solution (Optional)
One possible way would be to add a parameter like “trigger_rollback”, which defaults to true, but can be set to false.

Another way would be a separate, more “neutral”, API to add positive or negative messages to be displayed - without implicit transaction handling.

We reviewed this idea carefully, and while it was interesting, we concluded that due to all the internal implications we need to take into account, it is unlikely to make its way into APEX.

Comments

Comments

  • vincent morneau Admin OP 4 weeks ago

    The team discussed this idea today and we are concerned that this may lead to confusing scenarios. Errors were designed to stop the current transaction. For partial success and error transactions, perhaps you should log the error in your tables, then use present the error through an Alert style report.