Pieter de Jong Pieter de Jong
Jan 7, 2015 6:00:00 AM

In the latest release of STAEDEAN Business Integration Solutions for Microsoft Dynamics AX, we added an enhancement to streamline working with table events in Connectivity Studio. Before, you could use table events in Connectivity Studio in very simple scenarios. When you used multiple tables, things became more complex, because it was not possible to combine events and you had to define a table event for each table. Now, you can use message events to simply trigger messages based on changes in several records.

Up until now, table events allowed you to trigger a message based on changes in a record. However, the setup of a table event was not connected to the message itself and was somewhat complex to perform. We designed message events to eliminate this complexity.

As an example, let’s imagine a scenario that involves the export of changes in country data. Country data is stored in two tables, LogisticsAddressCountryRegion and LogisticsAddressCountryRegionTranslation. Therefore, the data should be exported if you make changes in one of these tables.

So far, when you used table events, you ended up with two table events and two XML files. Now, with the new enhancement in Connectivity Studio, you can use message events to group the table events, using a single XML export file.

Let’s quickly remind ourselves what the practice was up until now.

The first step was to create a new connectivity message to export the country data. You set up the Dynamics AX document as usual and exported the data to, for example, an XML file. After the setup, you created the table events. You needed to set up the table events for the tables called LogisticsAddressCountryRegion and LogisticsAddressCountryRegionTranslation. Once that was done, changes made to the country or translation would trigger a table event and the data would be exported one-by-one.

That setup already improved on previous functionality in Connectivity Studio for Dynamics AX, but there was still no clear relation between the message to be triggered and the table event itself. The relation between the message and the table event was based on the action menu item linked to the message.

Now, let’s take a look at what has changed.

Next to the table event you can now create a new event type called message event. These message events are directly linked to the message and the document record of the source document. You can define a message event in the header tab of the message, as illustrated in this screen image:

Connectivity Studio—how to define a message event in the message header tab

You can create message events by using the initialize or new option. By default, Connectivity Studio enables all events for a message event.

Both document records are added to the message event, because in this case the system needs to react to changes in both tables. If the setup of the Dynamics AX database log is defined for both tables, the message event triggers when changes occur in either table. When you enable the option Check fields, Connectivity Studio triggers the event only if one of the document fields is changed. Otherwise it will react to a change in every field. There is no additional setup required.

Like the table event, the message event adds or updates records in the table event log. The normal procedure of executing the process event runs the actual export of the data.

There is another difference between table events and message events: Message events are grouped together when processed. This means, for example, that, if multiple countries are changed, the process event starts a single message to handle all changes.

We think this change in Connectivity Studio will help you manage your Dynamics AX data by triggering messages based on changes in multiple records. Let us know how this works for you, or if you have questions. Please contact  STAEDEAN.

Pieter de Jong Pieter de Jong
TI_LOGO_TI-Logo-color andAXP_365

have now rebranded to

staedean-logo-teal