Posts

Showing posts from September, 2022

Using bearer token to call recurring integration of D365FnO using logic apps

Image
This article talks about using bearer token to authenticate recurring integration URIs to talk to D365FnO. For our example, we are using an XML based input, which we need to feed into D365FnO (for example: you can think of a feeding an XML to a composite entity). Assuming that we already have an enqueuing URL in place, we can go to logic apps designer to declare a variable called 'token' for our ease of calculations: We can call the token generating URL, through a HTTP POST request connecter in our Logic apps, as follows: Here the URI implies: the token generator URI, from " https://login.microsoftonline.com "  Header: set 'Content-type' as 'application/x-www-form-urlencoded' In Queries set: 'Grant_Type' = 'client_credentials' And in the body, set Client_Id = <Client Id from your App registration>, add your client_Secret by appending '&'. Client_Secret = <from your app registration>, add grant_type= 'Client_c

Parsing/reading CSV and excel file from Azure Blob storages, using Logic Ap for D365FnO

Image
  This small write-up can help you to read from a CSV or Excel and populate records in D365FnO, using Logic Apps. The main challenge here is, reading from Azure Blobs is easy, but the content thus obtained is a jumbled up JSON content and certainly not a CSV content. This document gives you an idea as to how to transform for the same, so that you can invoke a FinOps entity and do the rest of the CRUD operations. We are reading here a simple CSV file that contains of two columns, and we need to insert into SalesPool table: a. Reading from Blob: Supposing we have a scheduler that reads from an Azure blob, by looping through all the newly added blobs in a container (here the container name, for example, is ' container1 '): And then getting the content of the file using the following loop: We need to get the name of the file (the newly added file name in the blob container). This we can find out, first by inspecting the output from the previous step: {    "Id" :  "JT