I’m back with additional information about Azure API Management! More Azure content, and I’ll probably continue to produce posts regarding Azure in the future.
I believe there are numerous ways to learn new things, and for me, two of them are writing blog posts and using new technologies to solve problems at work. Of course, my goal is to attempt to apply the Azure themes I write about to Dynamics 365.
Today, I’m presenting an architecture approach for integrations, leveraging API Management and various other Azure components, for Dynamics 365 or anything else that has an endpoint.
We’ve seen a lot of improvements to the product since it was released as AX7, and some name changes too 😝 And one of the areas where we’ve seen more enhancements is the batch framework.
And since the currently live last version of Dynamics 365 Finance and Operations, 10.0.28, we have a new feature that will be enabled by default for all new instances, and it will be enabled for all existing instances in 10.0.29: the priority-based batch scheduling.
Let’s talk about logs in Dynamics 365 Finance and Operations. And I don’t mean the built-in database logs we’ve had since the old Axapta days. I’m talking about plain logs, a table and a form to see how/why data is changing, or logging external calls to OData or custom web services endpoints in the ERP.
It’s something that I’m sure almost all developers at some point have had to do. The customer wants to record CRUD events, you suggest enabling the DB log, but the customer wants a new form to see the data. Or maybe you’re monitoring all the calls to your custom web services.
It’s time to stop doing this, or at least to change how we do it.
It’s been a bit over 6 years since Microsoft released Dynamics AX7 in 2016. During this time we’ve gone through some name changes. And all of those who were already working with AX 2009 or AX 2012 have had to go through some habit changes too.
We’re slowly shifting to a true SaaS model for Finance and Operations, and one of the features of SaaS is that you pay for a specific amount of services. And this includes database space. This is something our CRM/Power Platform/Dataverse colleagues know much better than us.
If you check the Dynamics 365 licensing guide (I hope this will be the only time I write about licensing) you can see that the Finance and Operations database has a limited assigned amount of space:
Yes, that’s right, only 20 GB of base DB capacity, plus extra capacity per each user license. And everything that exceeds that capacity will be billed. I haven’t found the price in the latest version of the licensing guide, but the last time I saw it, it was like €40/GB. But I haven’t heard of anyone being billed yet.
This means that we need to be careful regarding what we create in the ERP. And for me, one of the things we need to do is getting rid of logs inside Dynamics 365 F&O.
What to use instead? That’s up to you, but there are plenty of options without going outside the Microsoft ecosystem. And of course for a fraction of the price you’d pay for a single GB of extra DB capacity.
Azure Monitor is a bigger and more complete (and complex) solution for monitoring. If you’re already using it, you could integrate your Dynamics 365 logs here, but otherwise I wouldn’t choose it as the first option when creating logs.
And of course we also have old-style file-based logs, which could also be the cheapest solution using Azure Blob Storage. Of course, file-based logs aren’t the easiest to read, but there’s plenty of software that helps with that.
Whatever is the solution you choose, even if it’s none of the above, the way of implementing it should be more or less the same, and deciding which data you want to log and which format this log will have should be your first steps.
Then, depending on which log tools you’re going to use, you’ll need to create some kind of API to send the data to that service.
A final thought
I’ve been thinking about this a lot lately. And also about putting an API Management in front of each Dynamics 365 instance. A lot. This could be another step towards a real cloud ERP that takes advantage of being hosted in Azure and uses more of the tools it has.
Is it extra work? Yes, it is. Is this extra work worth the effort? In my opinion, it is.
The APIM made me realize the logging thing. When you configure an APIM you can enable Application Insights. Then you can track the requests that get to the APIM, the request that goes into Dynamics 365, the response from Dynamics 365 to the APIM and the response from the APIM to the caller. And have complete detail of every step!
So, why not doing the same when logging things inside Dynamics 365? I think that knowing why something is going wrong is important, and that’s why we sometimes need logs, and using tools like Application Insights that have far more capacities than a D365 table and form is a much better idea.
In today’s post, I want to talk about using Azure API Management (APIM) along Dynamics 365 Finance and Operations.
Azure API Management is a hybrid, multi-cloud management platform for APIs across all environments. This means that, after deploying an APIM account, you can create an API that can serve services from one system or multiple.