Product: Dynamics 365 Business Central
Issue: When attempting to export an order in Business Central, one of the following errors is received:
C/AL Version (Older BC Versions):
'Internal_ServerError The following C/AL functions are limited during write transactions because one or more tables will be locked. Form.RunModal is not allowed in write transactions. Codeunit.Run is allowed in write transactions only if the return value is not used. For example, 'OK := Codeunit.Run()' is not allowed. Report.RunModal is allowed in write transactions only if 'RequestForm = FALSE'. For example, 'Report.RunModal(...,FALSE)' is allowed. XmlPort.RunModal is allowed in write transactions only if 'RequestForm = FALSE'. For example, 'XmlPort.RunModal(...,FALSE)' is allowed. Use the COMMIT function to save the changes before this call, or structure the code differently.'
AL Version (Newer BC Versions):
'System.Exception: Internal_ServerError The following AL methods are limited during write transactions because one or more tables will be locked. Form.RunModal is not allowed in write transactions. Codeunit.Run is allowed in write transactions only if the return value is not used. For example, 'OK := Codeunit.Run()' is not allowed. Report.RunModal is allowed in write transactions only if 'RequestForm = false'. For example, 'Report.RunModal(...,false)' is allowed. XmlPort.RunModal is allowed in write transactions only if 'RequestForm = false'. For example, 'XmlPort.RunModal(...,false)' is allowed. Use the commit method to save the changes before this call, or structure the code differently. Contact your application developer for further assistance.'
Reason: A duplicate cross-reference number exists in Business Central for the same item. Business Central requires cross-reference numbers to be unique — when a duplicate is present, the system cannot resolve the correct item during export, causing the write transaction to fail.
Solution — Remove the Duplicate Item Cross-Reference
Identify and remove the duplicate cross-reference number from the affected item in Business Central.
Navigate: Business Central → Search → Items
Locate: The item causing the export failure
Select: Item References from the item card
Review: All cross-reference entries for duplicate values
Remove: Delete the duplicate cross-reference entry
Retry: Re-export the order after making the correction
Additional Assistanc
If the error persists after removing the duplicate cross-reference, contact TrueCommerce Support or your Value Added Reseller (VAR) for further assistance.
rev 10/30/2026

