In previous blog post we built simple scenario where we created customer in AX from external web request using Azure Logic App.
This time I am going to extend Logic App that was created before to support Common Data Model (CDM). There are couple of APIs that we can use:
In this case, I want to create a new record in CDM every time when a customer is created in AX.
We can achieve this simply by adding new API to our App and mapping the fields. I used “Customer” entity from CDM, which comes out of the box with CDM database.
After request is sent and customer is created, we have two options to check it in CDM: view records using Excel add-in or build new PowerApp.
Option 1: Go to powerapps.microsoft.com, find your entity and open it in Excel.
Excel Add-in supports all features that we like in AX 7, so you can create, update and delete records with it.
Option 2: Create from powerapps.microsoft.com new app in PowerApps Studio for Windows or PowerApps Studio for Web. I personally prefer desktop version, because it works faster for me.
From PowerApps studio you can create new App for CDM, CRM or even for AX. When you create new CDM App you need to specify connection to database and select entity, same as above we will select “Customers”.
After that studio will automatically generate an App for us.
By default, new App has 3 screens: Browse, Details and Edit.
We will modify the layout and delete non relevant fields. So instead of Fax, Phone and Address we will put Customer Id and Description on Browse screen and add contact information to Details screen.
That’s all, now we can run the App and see what we’ve got.
Nice and simple way to build new App to work with customers without even a line of code!