dynamicsnavax: Recurring import General Journal file using Microsoft Flow #MicrosoftFlow #MSDyn365FO
Microsoft Flow is a simple and cost effective way of integrating. In this post I will walk through how to use Flow for recurring file integration. The most common scenario I can think of is the general journal import.
First, I would recommend reading Microsoft article on recurring integration.
Solution below shows you how to use Microsoft Flow to read from OneDrive for Business and import to FinOps. The exact same thing can be done using Logic Apps for a more enterprise managed solution.
Lets start by setting up our folder structure to drop our general journal files in. Create four folders like so:
In the next step, I used “Initialize variables” to be able to quickly change settings later in the flow. Otherwise, it can get messy to maintain and move around.
You might ask why I used an Object type rather than a String. In a string, I can set a single variable only. However, with the object I used a json string which allows me to set up multiple variables. (Let me know if this can be in a better way)
I parsed the json string. You can do this easily by copying the json string from above. Then click “Use sample payload to generate schema” to paste it in. It will generate the schema for you.
Next two steps is moving the file from inbound folder to processing folder. However OneDrive for Business doesn't have a Move action. I had to use a Create and Delete action as two steps. If you are using OneDrive for personal you will see a Move file action.
Once its moved, I use “Get file content” action to read the file.
Next, I used an HTTP POST action to send to the enqueue the file. I use the variables that were initialized earlier.
In the header I am setting the external identifier as the name of the file. This is done so in FinOps we can identify the job by the name.
This is what the result looks like in FinOps.
We are done sending the file to FinOps. The next steps are doing some cleaning of the file by moving to the success or error folder. Or you can email someone when a file is process or it errors out. You can get fancy.
However, I will show an example what you can do. Below I check every minute for 60 minutes if the job has been processed in FinOps. You can change the interval.
I added a “Do until” action. This is a loop that executes at an interval for a time limit.
The advanced query from the above is pasted below for your convenience. Its just doing an “or” condition. It checks if it is in any of these states.
Initially it gets Queued, In Process and will go to Processed if it is successful.
All the statuses are listed here:
Next, I added a Condition to check the job status. If it is Processed, then I know it is successful. I can then move the file to the success folder. Otherwise, to the error folder.
I will stop here as the next few stops are pretty much a repeat of moving a file in OneDrive.
Why don’t you take it to the next level and check out Ludwig’s blog post on automating the posting of the general journal.
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
|powerobjects: Use Microsoft Flow with Dynamics 365 for Customer Engagement||Blog bot||Dynamics CRM: Blogs||0||03.10.2018 01:26|
|emeadaxsupport: Importing a General Journal using Data Import/Export Framework AX 2012||Blog bot||DAX Blogs||0||17.07.2014 20:12|
|Sample Design Patterns: Microsoft Dynamics AX - Remedy for slow Microsoft Excel import||Blog bot||DAX Blogs||0||29.05.2011 17:13|
|Platform updates overview - 3.70.B - NAV2009 R2||Blog bot||Dynamics CRM: Blogs||0||07.02.2011 22:06|
|wiki.dynamicsbook: Changes Made in Navision Attain 3.60||Blog bot||Dynamics CRM: Blogs||0||02.09.2008 13:23|
|Опции темы||Поиск в этой теме|