In the To-Increase Business Integration Solutions for Microsoft Dynamics NAV, you can use the SQLREADER endpoint to read XML messages from Microsoft SQL Server. Today, we explain how to create an import connection using SQL Server integration. Our focus will be mainly on the SQL Reader endpoint.
In the following example, we will import the sales orders from the SQL database if the status of the sales order (sales header) is other than “Open” (i.e. Status > 0).
To begin with, you create an internal document to import sales header information into Microsoft Dynamics NAV. We want to generate the No. field automatically based on a number series. So select the No. field and in the field properties provide the Value Type and Value.
Next, create an external document to import sales header information from the SQL database. Choose the Subtype as SQL Server and provide SQL server connection credentials or a SQL connection string.
Then select the corresponding SQL table and fields.
Now, you need to create a connection. There are several ways to accomplish this.
You can create a connection with the SQL Reader.
Or you can create a connection with the SQL Mapper.
You can also create a connection with the SQL Record Generator.
Or you can use the Pipeline to create a connection.
In the next step, you process the connection. If the job queue is set up properly, the records are processed through the job queue.
Once the records have been processed successfully, check History.
I hope this example gives you a good idea on how to work with the SQL Reader endpoint in a Dynamics NAV environment! With any feedback or questions, please contact To-Increase.