We are all exited with Dynamics365 coming. As we know, it is based on PowerApps, Common Data Model and Flow. Finally, we can put all these features together with connector to AX online which is released recently (https://flow.microsoft.com/en-us/blog/more-september-updates/).
Today, I will show how Azure Logic Apps can be used in integration scenarios. For example, we want to create a new customer in AX from an external web service. In previous versions it was non-trivial task, but now it could be done in couple of clicks!
First of all, we need to create a new Logic App. We can do this either from Visual Studio or directly from Azure portal.
This app will receive requests from external web services and to handle this we will add HTTP request trigger that accepts JSON.

To build JSON schema you can use one of dozens online services. Here is example from one of them:

As you can see, my request contains AccountNum, DataAreaId, CurrencyCode, CustomerGroupId, name and AddressCountryRegionId fields.
On the next step we will add Dynamics AX connector that uses values from JSON request to create new customer. After specifying connection to AX 7, you can select any OData entity from drop down list and it will automatically add all mandatory fields. Each filed you can map with value from JSON simply selecting them from a list.

That’s all, save it and we can start testing.
To send the request I used Postman, but in real life scenario it would be a web service.

Voila! New customer has been created in AX.

On Azure portal you can track execution status and debug into each step, where you can see all data that was sent.


What’s next? You can add a response to notify web service if record was successfully created, send email with confirmation or even SMS.
In my next post I’m going to look at CDM and PowerApps, stay tuned!

Like
Report
*This post is locked for comments