Business Integration Solutions Documentation
SQL Writer Endpoint
Use SQL Writer endpoint to write XML data, generated by Microsoft Dynamics NAV, to SQL Server in XML format and process the data into the SQL tables.
The SQL Writer endpoint expects the data to be written in a SQL Server database, which is connected using the connection string specified. As this variant of the writer uses the automatic mode, no further programming is required in SQL Server. The connection string must be in the appropriate format, and must at least contain the server name, the database name and the authentication information.
Setting SQL Writer Endpoint
Prerequisites:
- Access to a SQL server database
- Obtain a connection string to the SQL Server database, which will allow the Microsoft Dynamics 365 Business Central service tier user to connect and write data to it. This is required when the user running the Business Central Service Tier does not have access to that environment
Setup
- Define an external document definition for the SQL Server tables and fields that must be written. Before designing the document, set the subtype of the document to SQL, and fill out the connection details. This will allow the creating a document structure similar to internal documents.
- Include the SQL Writer endpoint into the pipeline.
- Set the SQL document as Document No. in the SQL Writer endpoint.
- Check the configuration of the endpoint, which will validate the external document definition and test the SQL connection.
- Optionally enable Omit Output: This will allow write transactions to tables that have triggers set. This does hamper the reporting of a succesful query: e.g. when a query is executed, but rows modified is 0, it will not report an error. If you're unsure, leave Omit Output on it's default value (false)