How to Import File Records and Process Them in Batch Using X++ in D365 Finance and Operations

How to Import File Records and Process Them in Batch Using X++ in D365 Finance and Operations

Importing large data files efficiently is a common requirement in Dynamics 365 Finance and Operations. In this article, we’ll walk through how to use X++ to import file records and process them through a batch job — enabling scalable, automated data handling in your D365FO environment.

What issues can arise if large data imports are executed on the client side instead of through a batch job in Dynamics 365 F&O?

If you don’t use a batch job and instead start importing large data files directly on the screen (client-side) in Dynamics 365 Finance and Operations (D365FO), you may face several critical issues:

⚠️ Problems When Not Using Batch for Large File Imports in D365FO

  1. UI Freezing / Timeout Issues

  2. Poor User Experience

  3. Performance Degradation

The following code demonstrates how to create a SysOperation batch process to import file data in Dynamics 365 F&O using x++ code.

Contract class named as "AA_ImportFileInBatchContract"

UI Builder class named as "AA_ImportFileInBatchUIBuilder"

Service class named as "AA_ImportFileInBatchService"

Controller class named as "AA_ImportFileInBatchController"

Note: Currently, only Excel files with extensions .csv and .xlsx are allowed for import in the batch job. If you need to support additional file types, such as .pdf, you can update the "availableTypes" variable in the "UIBuilder class" to include the desired extension.

Happy Learning,

Syed Amir Ali.

Pratik Chakraborty

Microsoft Certified Professional | Dynamic365 Finance & Operation Development | ERP Integrations | Azure | .Net Dev | Java Developer

1mo

💡 Great insight

Like
Reply
Pranav Koshti

Associate Manager at Accenture

1mo

Quick question for more understanding: W hat advantage will this have over the DMF import?

Sanjay Samanta

Technical Lead at Nimbus Systems Pvt Ltd || Microsoft Dynamics 365 Technical || Dynamics AX 2012 Developer

1mo

Helpfull

Usama Mehmood

MCP Bizz Apps | SCM | WMS | Finance | HRM | Do Centric Advanced Reporting | Integration & Business process specialist | Technical Lead - D365 F&O | Digital Transformation

1mo

Thanks for sharing, Syed Amir

To view or add a comment, sign in

Others also viewed

Explore topics