Showing posts with label LogicApps. Show all posts
Showing posts with label LogicApps. Show all posts

Sunday, September 29, 2024

Recurring Integrations Export through LogicApps

 Scenario:-In this blog we will see how to export packages from d365fo using recurring integrations via Logic App.

Step1:-Create a Data export project in D365fo by navigating to Data management workspaces

After that click on create recurring job and give application id which is created in azure(app registration),name 

Step2:-Click on set processing recurrence and choose time and count

Step3:-Now set monitoring recurrence choose time and count 

Step4:- Click on ok it will show a popup then click on yes

Step5:-Go to Azure create anew logic app and start creating new workflow .Over all workflow can be seen in below

Step6:- create a schedule went to extract file

Step7:-Now choose http and start exporting file by using deque 

Get :- https://<base URL>/api/connector/dequeue/<activity ID>

Step8:-now use parse json so that what ever you get in previous body you can now use fie location to download

Step9:-Now use http and download the file

Use method Get and choose file location from dynamic content 

Step10:-Now use create blob connector to  create a file in blob storage

Step11:-now again a http connector for acknowledgment of file  saying d365fo that I have received file

POST:- https://<base URL>/api/connector/ack/<activity ID>

In body use body of deque output

Step12:-on scheduled time logicapps fires  and start exporting file from D365fo

And one can see the status of Data Project whether processed or dequeued or downloaded

Step13:-You can  now open Blob storage and see Whether new files added or not


  

Thank You


Keep Daxing!!



Recurring Integrations Import through LogicApps

  Scenario :-In this blog we will see import a file through recurring integrations via Logic Apps

Step1:-Go to D365fo Data management workspace and create  a Import Data Project as shown in below

Click on create Recurring jobs

Step2:-Then give name ,description, Application Id which created in Azure, enable all option as shown in below

Step3:-Click on set processing recurrence and choose time ,count.

Step4:-Then click on monitoring recurrence and choose time and count.

Step5:-Then click ok you will see a popup continue click on yes


Now All setup is done in D365fo for importing through recurring integrations

Step6:-Go to Azure create anew logic app and start creating new workflow .Over all workflow can be seen in below

Step7:-First one will be blob modify trigger I have choose that means whenever I will get new file added in azure blob storage my logicapps  gets fired.

Step8:-Next I used get blob action so that I can directly get the new file 

Step9:-Then choose Http and give authorization like secret, cleintid, tenantId ,in method choose post

url:- https://trial-rh4cr1.trial.operations.dynamics.com/api/connector/enqueue/{59B7CEE6-71C3-4DB6-8101-415E5CF11C00}?entity=Customer groups

in body pass file by dynamic content for earlier connector

Note:-Disable allow chunking option in settings of http connector other wise you will encounter a error partial loading.... some kind of error

Step10:-Put delay for next status check because it take time to dump data into D365fo

Step11:-Choose one more http to check status of file importing

POST :  D365url/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetMessageStatus

BODY

{

    "messageId":pass message id from previous enqueue body

}

Step12:-Navigate to D365fo data project and check for mange messages


Step13:-Go to Customer groups and check for new entry's

Step14:-As well as one can check status in logic app itself and can further share information with other messenger apps by using json parse connector.



Thank you


Keep Daxing!!




Tuesday, August 20, 2024

Package Api Import through logicapp

 Scenario :-Import from package 

I got a requirement where I will get datapacakages added in blob so I need to import data in d365fo 

Step1:-Create a data project in d365fo using Datamangement

Note:-Add a sample file for the project.



Step2:-Create a Workflow in logicapp in AZURE. So my trigger point will be blob modify as my datapacakages will be added in blob storage


Step3:-Take next action as Blob and take function as create sas URL by path 


Step4:-Now take http and use method as post and URL will be

D365fourl/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.

ImportFromPackage




Step5:-To check the status of package imported successfully parse the previous output 

Step6:-Now use http to get status from d365fo

Note:-Use delay because instantly we cant check We need to give some time to import in D365fo




Step7:-One can see logic app run history once we get a data package added in blob



Step8:-Save Logicapp and wait for file to be added in blob once we get datapacakages added in blob

you can see record inserted in d365fo.If we have records already it will get updated.


      keep Daxing!

 
























Undo settlement of payment and invoice through code

 internal final class RunnableClasstestforundosettlement {     /// <summary>     /// Class entry point. The system will call this meth...