Processing multiple records

In Dynamics AX, by default most of the functions available on forms are related to a currently selected single record. It is also possible to process several selected records at once, although some modifications are required.

In this recipe, we will explore how a selection of multiple records can be processed on a form. For this demonstration, we will add a button to the action pane on the Main account list page to show multiple selected accounts in the Infolog.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. In the AOT, open the MainAccountListPage form and create a new method with the following code:
    public void processSelected() { MainAccount tmpMainAccount; tmpMainAccount = MainAccount_ds.getFirst(1) ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.