Release Date: 13 December 2025
Release Summary
The update addresses an error encountered during the posting of item-tracked IC Sales Return Orders, which previously resulted in a failure due to a code change in the Sales-Post codeunit. Additionally, a new feature allows users to block automatic posting of sales drop shipment orders, providing greater control over the process. This is achieved through a new Boolean parameter, SuppressAutoPost, which can be set via an integration event, enabling custom logic to determine posting behavior based on specific conditions. Overall, these changes enhance the reliability and flexibility of the posting process in the system.
Bug Fixes
General
Fixed an error that occurred when posting item-tracked IC Sales Return Orders to intercompany web service partners.
When posting warehouse receipts for IC Sales Return Orders with lot-tracked items, posting could fail with the error:
“Codeunit.Run is allowed in write transactions only if the return value is not used”
and the IC web service transaction was not sent.
This was caused by a change in the standard Sales-Post codeunit where posting now runs with CommitBehavior::Ignore. In this context, COMMIT calls are ignored, so our existing pattern of committing and then calling Codeunit.Run within the posting routine was no longer valid and triggered the error.
We have changed the Intercompany app so that IC web service calls are deferred until after posting is fully completed:
A new single instance codeunit now stores IC Outbox Transactions that must be sent during posting.
During posting, calls to SendTransactionToWebServicePartner detect that they are running in posting context and mark the transaction as deferred during posting instead of calling the web service immediately.
After posting is completed (when commits are no longer suppressed), a subscriber processes all deferred IC transactions and sends them to the web service partner.
With this change, warehouse receipts and IC Sales Return Orders with item tracking can be posted without errors, and the corresponding IC web service calls are executed safely after posting is committed.
How It Works
When Sales-Post begins IC document processing, OnBeforeSendICDocument sets the posting context flag
When SendTransactionToWebServicePartner is called during posting, it detects the posting context and defers the transaction instead of making the web service call
After posting completes, OnAfterPostSalesDoc retrieves deferred transactions and processes them when commits are no longer suppressed
This resolves the "Codeunit.Run is allowed in write transactions only if the return value is not used" error that occurred when posting documents with IC web service partners.
Improvements
General
Renamed “Activate Intercompany” and “Set up Intercompany” to “Activate Abakion Intercompany” and “Set up Abakion Intercompany”.
To reduce confusion between the Abakion Intercompany app and the standard Business Central (BC) functionality, the following changes have been made:
The caption “Activate Intercompany” has been renamed to “Activate Abakion Intercompany”.
The caption “Set up Intercompany” has been renamed to “Set up Abakion Intercompany”.
These changes are visible on the Assisted Setup Page after installing the Intercompany (IC) app.
Business Value: This update clarifies which features belong to the Abakion Intercompany app, helping users distinguish between standard BC features and Abakion’s enhancements.
Technical Solution: Caption text updated in the Assisted Setup Page.
Make it possible to stop/block automatic sales drop shipment posting
Description: It is now possible to prevent the automatic posting of sales drop shipment orders. With this update, posting can be suspended and invoked manually, providing greater control over the drop shipment process.
Technical Details:
A new Boolean parameter, SuppressAutoPost, has been added to the SalesOrderAfterCreate procedure.
The parameter is propagated through the relevant call chain and can be set using a new integration event.
This allows for custom logic (via PTE) to determine, for example, if the IC Partner-ID is filled for the Sell-to Customer, and to block automatic posting accordingly.
The integration event OnSalesOrderAfterCreateOnBeforeAutoPost enables partners to attach their own logic for controlling auto-posting behavior.
