Skip to content


Error saving globallasterror from Business Central to SQL

asked 8 months ago


I am importing documents from SQL to Business Central, but when the transaction has an error, I want to save the error message in the SQL source table. When the error message has the ‘ character the task for updating the error message I have syntax error.

I tried to replace the ‘ using SQL statements but I have the same error.

The error message is like this… “Failed to create record. Direct Posting must be equal to ‘Yes’ in G/L account No. XXXXX”

and the error I get is Error near to ‘Yes’

Any Idea how I can save the error message in SQL when it has this character?



If you would like to submit an answer or comment, please sign in to the eOne portal.