Streamline Data Exports with Connectivity Studio for Dynamics AX
Table of contents
Benefit from using STAEDEAN Connectivity Studio for Microsoft Dynamics AX, one of our Business Integration Solutions, to make it easier to export data by using temporary tables.
In your Dynamics AX environment, such temporary tables help you avoid the limitations or complex queries you may face when you need to export pricing with per-customer or product-specific discounts. You can develop your calculations as usual in the application object tree (AOT). In today’s post, we take you through the few easy steps you take when you use Connectivity Studio to perform data exports with temporary tables.
In this usage scenario, you learn how to populate a temporary table with two records and export it to an XML file. To export prices by using a temporary table, you need to take the following simple steps:
- Create a message using the message setup wizard
- Create the Dynamics AX source document and connector
- Create the target XML document and connector
- Extend the document class to insert data into the temporary table
- Run the message
Create a message using the message setup wizard
When you select the project, you can create a new Connectivity Studio message by using the message setup wizard. You see the concept and components of the message setup in the overview on the start screen.
On the next page, you start with the actual setup of the message.
Because you want to export data, you need to specify a source application, Microsoft Dynamics AX, as well as a target application called ERP. Other details you need:
- Source connector: Existing Active company
- Source document: New, with the type Microsoft Dynamics AX
- Target connector: Existing Folder
- Target document: New, with the type XML
Now you can define which table you want to export to XML. In Connectivity Studio, you specify a temporary table called TmpSalesItemReq, and select the fields SalesPrice, SalesUnit, and ItemId. The message is then created with a default mapping for the selected fields.
Extend the document class to insert data into temporary tables
Now you need to create data in this table and make sure your source document can use it. The easiest way to accomplish that is to use the Extend class function in the action pane.
In Connectivity Studio, it’s easy to rename temporary tables and de-class them.
Now you can add data to the temporary table and use it in the message you created earlier.
To read the entity set for the query, you call the next method and construct it as below. Be aware that the Data method is used to break the link with the query by creating a copy of the record.
Now you can link the new class in the source document.
Run the message
You have finished the setup! You can now run the message and see its history.
The XML results contain the fields you defined in the XML document.
If you like, contact us to get a free XPO file to practice using Connectivity Studio to create temporary tables and export data in your Dynamics AX environment.
These are all the actions you need to take in order to export temporary tables with STAEDEAN Connectivity Studio. As you see, it’s very easy to extend Connectivity Studio with code to support custom processes.