If you’re an iDempiere user, you may often need to run a process on multiple records simultaneously. This can be particularly useful for tasks like batch updating, mass approval, or executing custom processes across selected records. Fortunately, iDempiere provides a powerful feature that allows you to do just that, directly from the window grid view. Here’s how you can leverage this functionality to enhance your workflow efficiency.
Please note that this information is about running processes on standard Windows. Info Windows are more powerful in this regard, but the development approach for them is a bit different.
Table of contents
Step-by-Step Guide to Running Processes on Multiple Records
- Navigate to the Desired Window: Start by navigating to the window where the records you want to process are located. For example, go to the Sales Order window if you need to update multiple sales orders.
- Select the Records: In the grid view of the window, you can select multiple records by clicking on the box to the left of each row. Additionally, you can refine your selection using a filter query or search criteria to target specific records.
- Run the Process: Once you have selected the records, click on the ‘Gear’ toolbar button, and a dialog box will appear, allowing you to choose the specific process you want to run.
- Configure Process Parameters: Depending on the process, you may need to configure certain parameters. Fill in the required information and confirm your choices. The process will then execute across all the selected records.
![](https://www.idempiere.org/wp-content/uploads/2024/06/Screenshot-from-2024-06-17-13-20-29-1024x470.png)
The process needs to support the multi-record selection. To learn how to develop that kind of process, read the How to develop multiple records process section.
Why This Feature is Powerful
- Efficiency: Running processes across multiple records simultaneously saves time and reduces repetitive tasks, allowing you to focus on more strategic activities.
- Consistency: Ensuring that the same process is applied uniformly across all selected records helps maintain data integrity and consistency.
- Scalability: Whether you’re handling a few records or hundreds, this feature scales to meet your needs, making it ideal for both small businesses and large enterprises.
Practical Applications
- Batch Updating: Easily update fields across multiple records, such as changing the status of several sales orders or updating inventory levels.
- Mass Approval: Approve multiple purchase orders or invoices in one go, streamlining your approval workflow.
- Custom Processes: Execute custom scripts or processes that you’ve developed, enabling tailored solutions for your specific business needs.
How to develop multiple records process section
Implementing this is quite easy. In your custom process, you need to have a List<Integer>
variable that gets populated by the core method SrvProcess.getRecord_Ids()
. Once you have this array populated, you need to write your custom code to iterate through the array and run the necessary instructions.
Check out the following code taken from the Period Control Status class in iDempiere.
MProcessPara.validateUnknownParameter(getProcessInfo().getAD_Process_ID(), para[i]);
}
p_C_PeriodControl_IDs = getRecord_IDs();
if (p_C_PeriodControl_IDs == null || p_C_PeriodControl_IDs.size() == 0) {
p_C_PeriodControl_IDs = new ArrayList<Integer>();
p_C_PeriodControl_IDs.add(getRecord_ID());
How many records can I process at the same time?
On Standard Windows, you cannot select “all” records, only the records present in the grid. By default, you can run processes in batches of 25 records (master) or 10 records (detail). If you want to increase that limit, you can adjust the SysConfig variables ZK_PAGING_SIZE
and ZK_PAGING_DETAIL_SIZE
to expand those limits.
Conclusion
The ability to run processes across multiple records in iDempiere’s window grid view is a game-changer for implementors looking to enhance their users’ productivity and streamline their operations. By leveraging this feature, you can ensure that your business processes are efficient, consistent, and scalable. By the way, the Delete button is also designed to manage multiple records.
Do you have further questions? Join our community forums to share your experiences and learn from other users.
![Diego Ruiz](https://www.idempiere.org/wp-content/uploads/2020/10/index.png)
I am a systems engineer with a great passion for open source, software development, and technology in general. I have been part of the iDempiere community since 2012. I believe the enterprise world is one of the most aggressive environments out there. Companies tend to ruthlessly compete against each other. That is why seeing competitors co-exist and cooperate in harmony in iDempiere (and OSS communities in general) is so interesting to me.