Wednesday, February 19, 2025

Exporting a File from D365 Using Deque and Uploading It to Blob via Logic Apps

Exporting a File from D365 Using Deque and Uploading It to Blob via Logic Apps


Follow the below steps:

1. Create an export project in the Data Management(DMF).

2. Under Manage Recurring Data Jobs, create a new record and add the application ID.

3. Set the processing recurrence and enable the corresponding boolean.

4. Copy the value from the ID field.

5. Create an HTTP request, paste the URL provided below, and use the GET method.

     {{resource}}/api/connector/dequeue/{activity ID}?company=USMF

6. Instead of generating a token, assign the values in the Authentication tab.

7. Retrieve the Download Location from the previous step and assign it to a new HTTP trigger to get the file.

       body('Get_the_package_Download_URL')?['DownloadLocation']

8. Use the Upload to Blob action and provide the container name, blob name, and content.



Output:


1. The Get Package Download URL step will return the JSON response, from which we need to capture the DownloadLocation.

2. The Download Package step will return an octet-stream.

3. Since the response is a ZIP file, it is not possible to read the data directly.

4. The ZIP file will be stored in Blob Storage.



5. Below is the CSV file exported from D365.



D365:

  • Once file is fetched from D365 status will change in manage messages.


Keep Daxing!!

No comments:

Post a Comment