Posts

Showing posts from 2021

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 ...

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...