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




Recurring Integrations Import through postman

 Scenario:-Today in this blog we will see import a file through recurring integrations through postman.

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 postman and generate bearer token as it is mandatory for OData or Package Api for Authorization

Get :-https://login.microsoftonline.com/tenantid/oauth2/token 

 

Body:- formdata 

 

a) tenant_id  

b) client_id –  

c) client_secret –  
d) grant_type – client_credentials 
e) resource – enter D365FO environment URL (note it should not end with /) 

 

Output:- 

{ 

    "token_type""Bearer", 

    "expires_in""3599", 

    "ext_expires_in""3599", 

    "expires_on""1723463000", 

    "not_before""1723459100", 

    "access_token""eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IktRMnRBY3JFN2xCYVZWR0JtYzVGb2JnZEpvNCIsImtpZCI6IktRMnRBY3JFN2xCYVZWR0JtYzVGb2JnZEpvNCJ9.eyJhdWQiOiJodHRwczovL3RyaWFsLXpwZ3l2ay50cmlhbC5vcGVyYXRpb25zLmR5bmFtaWNzLmNvbS8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC9jYTA2YTExMC1mYzMwLTQ3ZTUtOWRkNC03MThkNWQ0YzQyNDQvIiwiaWF0IjoxNzIzNDU5MTAwLCJuYmYiOjE3MjM0NTkxMDAsImV4cCI6MTcyMzQ2MzAwMCwiYWlvIjoiRTJkZ1lEaW5WelN6T2o1LzZaSHN2Y212UHA0eEFnQT0iLCJhcHBpZCI6IjQ5ZjAxNWI5LWQ1MzMtNDdlNi1iYTI2LTc3MGZlMTU3Y2NjMyIsImFwcGlkYWNyIjoiMSIsImlkcCI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2NhMDZhMTEwLWZjMzAtNDdlNS05ZGQ0LTcxOGQ1ZDRjNDI0NC8iLCJpZHR5cCI6ImFwcCIsIm9pZCI6IjYyNGE1MDBiLTk3ODItNDk1ZC1hMWQ1LTc4YTNkYTg2MTg2OSIsInJoIjoiMC5BU29BRUtFR3lqRDg1VWVkMUhHTlhVeENSQlVBQUFBQUFBQUF3QUFBQUFBQUFBQXFBQUEuIiwic3ViIjoiNjI0YTUwMGItOTc4Mi00OTVkLWExZDUtNzhhM2RhODYxODY5IiwidGlkIjoiY2EwNmExMTAtZmMzMC00N2U1LTlkZDQtNzE4ZDVkNGM0MjQ0IiwidXRpIjoiZXdQWWU3S2hoVXllS0dURGgtS1VBQSIsInZlciI6IjEuMCIsInhtc19pZHJlbCI6IjcgMiJ9.kNDAndZRZgwN-78gPl3aSHW-A7am5hSALHrqDJpwJBITgXePf2BtbqkyMYV6H_T_vlCp2nCymEFrSbJJFihGQ1f5xiuth9vjLasSm1sH5mK2Gr8t7Y78YEdjYnABI0NIIrHBug__aEGdB-eAd7zBmI_rZ9f1ca4UBHxlrjskZCB6hoEjO44v0_eisWTwU5o6no6GI8ZrpAbDiNkqpiZMwwfh6JJfm9SQwq1k_rTFhyGQ8lg19zofxy4l29IMw4-kwTqQYN5_JeEiZCxVbsJ2WjUJpLzKNpabyDe859Vr9HQe1MwSAZHfgvvPF3020po9hrhznewHkOGmKKOGZyzrNQ" 

} 

 


Step7:-Choose next request for importing package into D365fo and in authorization choose bearer token and paste token generated in before step

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

Note :-In body section in binary upload file you want to import into D365fo

After sending request you can see message id below.

Step8:-Go back to D365fo Import Data project and click on manage under three dots as you cant see it default then click on mange recurring data jobs

Step9:-Click on manage messages and filter by message id you got in post man before step 

You can see status processed 

Step10:-You can go to Account receivable>Customer Groups and check for new entry's

Note:-If you have previous Customer group that exists in D365fo then record gets update if its new it will inserted

 You can see new record inserted in Customer Groups

Step11:-If you want to check status in postman itself you can send  a new post request

Post:- https://trial-rh4cr1.trial.operations.dynamics.com/data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetMessageStatus

In body :-

{
    "messageId":"b71aae14-6023-4bff-8f21-a7040d780d6d"
}

Once you send request you can status below



Thank you 

Keep Daxing!!


Upload File from local system in a form

 Actions to be done at 3 stages  1) Create Fileupload item by right clicking on design as shown in image below 2)Change Properties especiall...