LC0054
Stefan Maroń edited this page Feb 12, 2024
·
1 revision
Database write transactions in try methods
Because changes made to the database by a try method aren't rolled back, you shouldn't include database write transactions within a try method. By default, the Business Central Server configuration prevents you from doing this. If a try method contains a database write transaction, a runtime error occurs.
This is currently not prevented in Sandbox, just by default in Docker and OnPrem environments.
Read more here: https://demiliani.com/2023/02/08/dynamics-365-business-central-and-tryfunctions-be-careful/