Wednesday, December 11, 2024

Enqueue Process in D365FO.

API for Import (Enqueue) Process in D365FO.

1. Create the import project and add the data entity and its file type.
2. Click on the three dots, then select 'Manage recurring data jobs' under the 'Manage' tab.

 

3. Click on 'New,' provide a name, enter the application ID, and set 'Enabled' to true. Select the data source type as either 'File' or 'Data Package.'

4. Click on 'Set processing recurrence' and select the batch time. Set 'Is recurring job enabled' to 'Yes.'

 

5. Copy the generated ID from the ID field, which will be used in the enqueue URL.

6. Replace the placeholder activity ID in the enqueue URL with the ID copied from the data project. Also, specify the data entity name and company.

URL:

{{resource}}/api/connector/enqueue/<activity ID>?entity=<entity name>&company=USMF

7. Upload the Excel file under the binary node. And it will return the message id.

Using Post man:

 Using Logic app:

8. Click on 'Manage messages.' You will find the record in the 'Queued' state after triggering the URL.

9. The batch job will then run, process the records, and change the status accordingly.

10. If you want to check the status, you need to trigger the corresponding URL.

URL:

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

Body:

{
    "messageId":"<string>"
}

Using Post man:

 Using Logic app:


Keep Daxing!!


No comments:

Post a Comment