Posts

Telemetry and Monitory with Applications Insights and Dynamics 365 F&O

Image
Telemetry and Monitory with Applications Insights and Dynamics 365 F&O With version 10.0.39 Applications Insights integrations is GA. Hence, here is a very simple example how to start using this great feature and start monitoring the performance of your application.  For more about D365FO and Application Insights integration:  Monitoring and telemetry using Application Insights - Finance & Operations | Dynamics 365 | Microsoft Learn Dynamics 365 Finance and Operations - Monitoring and Telemetry using Application Insights -TechTalk (youtube.com) In this example we will monitor the execution time of a batch job. In particular, we will use a metric to analyze the execution over time.  // Create a class file and paste this code class SlowBatchJobClass extends RunBaseBatch implements BatchRetryable { [SysEntryPointAttribute] public void run() { int maxWaitInSeconds = 20; // Maximum wait time in seconds           SysApplicationInsightsTelemetryLogger logger =

Alternative to data obfuscation to TEST your D365FO integrations

Image
 When doing integrations one rely completely on the data that is generated by the LOB applications to test integrations. Moreover, using this data for testing purposes can lead to issues related with privacy and security. For this reasons there are sample data that is available but the scope is very narrow and it is only applicable for process testing.  It is desirable to have ways to produce this data in an ad-hoc manner as when it comes to integrations the scenarios can be quite diverse. In this article I'll explain a set of scripts that can produce huge amount of valid randomized data considering the master data available in D365FO.  Consider the following scenario:  A LOB that generates huge amount of sales orders (100.000+ lines per day) and send them to D365FO for creation, and further invoicing.  5.000+ customers 30.000+ items You cannot re-use production data.  Although obfuscation of the data is a possible solution does not guarantee that all the relevant scenarios will b

Simple python script to test your data entities using odata

Image
For a research I'm doing I had to create this simple script to test an odata endpoint. There many scripts out there but the good about this one is that is written in python. Just replace the values and execute! https://github.com/ccampora/D365FOMiddleware/D365FOAuth.py

Creating a DMF data package from files stored in an Azure blob storage

Image
Dynamics 365 for Finance and Operations support different scenarios for data integration.  Each scenario is listed on the following documentation: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/integration-overview One of the most common scenarios is when a large number of records need to be imported in D365FO. These record normally are coming from a third-party application as batches. If we follow the documentation guidelines for this scenario, the recommended pattern to be applied is Batch Data API For this kind of pattern we have the following API available:  Recurring Integration API  Data Management API  Many people uses the Recurring Integration API, however, I found it lacks of features (like asking for the task status) and also I haven't seen any further investment to improve it. For these reasons I choose to use the Data Management API.   Data Management API is a robust API and their specification can be found here: Data management pac

How to throw an exception in Logic Apps - made simple

Image
One of the features that are missing in Logic Apps (there is an idea posted since 2017) is the ability to throw an exception. What is currently available is the ability to Termine the flow, but that won't work if you are executing a parallel branch as it will finish it too. In order to workaround this, I have thought a very simple way to intentionally produce an exception. For this you can pick whatever connector and call it in a wrongly manner. For example: SQL connector executing an store procedure that doesn't exist. The above example I have used in the past and work very well, however, it makes you configure an connection to an existing SQL DB. Hence, to bringe this approach to a general escenario I have test it with an HTTP request node, which doesn't require connections at all. In order to our approach to work we need to meet two properties: 1. Whatever we use the connector the exception needs to be thrown in the 100% of the times. 2. We cannot introduce a d

Infamous "The natural key for some table was not found" solved once and for all

Image
Data entities in Dynamics 365 for Finance and Operations (D365FO) are awesome, as long as you can use the wizard to create them. Quite often you will find that some tables throw the infamous "The natural key was not found". This is because many tables actually don't have unique indexes - for many reason - but here I'll present a general solution to create any entity - read-only entities - in very simple steps.  Capture when trying to create an entity for InventTrans table In this example I'll create an entity for the InventTrans table as this table doesn't have an unique index.  Step 1: Use the wizard to create an entity but select any know table that happens to have unique indexes. In this case I'll select InventTable.  In the next screen Deselect all the fields and click Finish. You will end up with an entity with a single datasource Step 2:  In this step we need to create a View that is based on the table that we want to expose as an entity - in this ca
Power Platform - Canvas Apps - guide to printing (part 1) Introduction I decided to write this post because so far it is not possible to natively print out of Canvas App. However, before you continue to read you should know this idea has been around Microsoft's top requests from customers for a while and Microsoft has announced this feature is on the roadmap, however, it hasn't shared details about it release date. In the meantime you can consider the options I'll outlay here.  Background There are several scenarios where you may need to print something out of your Canvas App. For example, you may have a table, or a gallery. Most of the times, you will want to print only a portion of your screen.  As said, printing is not supported in Canvas App, nonetheless, there are workarounds you may consider before "coding null for an answer".  Additionally, you also need to have in mind that not every scenario will have the same solution. In the following I'll outline t