Modification of Inquiry Results: To Include an Additional Output Field
In this activity, you will learn how to modify an existing generic inquiry to include an additional column of data in the results grid.
Story
Suppose that you’re a technical specialist in your company who is working on simple customizations, including those involving the creation, modification, and use of generic inquiries. An accountant of your company has requested an inquiry that displays data about invoices and memos. You have offered the predefined Invoices and Memos (AR3010PL) list of records—a generic inquiry form. After reviewing this inquiry, the accountant has requested the following changes:
- Add to the inquiry results a column (Project ID) showing the identifier of the project related to each listed invoice
- Place the Project ID column after the column that holds the reference numbers of the invoices and memos
- Add the ability to view the details of any project by clicking its identifier in the Project ID column
- Add the ability to filter the inquiry results by the identifier of an invoice-related project
Configuration Overview
You will work with a copy of the predefined Invoices and Memos (AR3010PL) inquiry form, which has the AR-Invoices and Memos inquiry title and the Invoices and Memos site map title specified on the Generic Inquiry (SM208000) form.
The copy you will work with has the DB1-ARInvoicesMemos inquiry title and the S130 Invoices and Memos site map title specified on the Generic Inquiry form.
Process Overview
In the Summary area of the Invoices and Memos (AR301000) form, you’ll inspect the Project element to find the related data access class (DAC) and data field. Then you will make changes to the copied inquiry on the Generic Inquiry (SM208000) form. You will add a data field on the Results Grid tab of the form.
System Preparation
Launch the MYOB Acumatica website, and sign in to a tenant with the U100 dataset preloaded as system administrator Kimberly Gibbs. You should sign in by using the gibbs username and the 123 password.
Step 1: Inspecting UI Elements
To learn the data access classes and data fields you’ll need to use in future steps, do the following:
- Inspect the Project element in the Summary area of the
Invoices and Memos (AR301000) form to find the
related data access class (DAC) and data field. For the exact steps to do this,
see DAC Discovery: To Inspect UI Elements.Tip: While you are working with a generic inquiry on the Generic Inquiry (SM208000) form, you may find it convenient to have the form or forms containing the UI elements open in a separate browser tab. This lets you quickly switch between the Generic Inquiry form and the form where you’re inspecting the elements.
- Make a note of the DAC and data field of the Project element (PX.Objects.AR.ARInvoice and ProjectID, respectively).
Step 2: Adding a Data Field, Changing the Caption, and Setting Up Default Navigation and Filtering
To add a column to the results grid of the existing inquiry, do the following:
- Open the Generic Inquiry (SM208000) form.
- In the Inquiry Title box of the Summary area, select DB1-ARInvoicesMemos.
- In the Site Map Title box of the Summary area, type Invoices and Memos with Projects.
- On the Data Sources tab, verify that the
PX.Objects.AR.ARInvoicetable is listed. This means that you do not need to add the table to retrieve identifiers of projects associated with invoices. - On the Results Grid tab, add a row, and specify the
following settings in the added row:
- Object: ARInvoice
- Data Field: ProjectID
Notice that the Visible check box is selected by default, which indicates that the system will display the added column in the generic inquiry form.
Also notice that the Default Navigation check box is selected by default, indicating that the values in this column will be shown as links; this is because the Projects (PM301000) form is specified for the data field as the default form defined in the source code. In the generic inquiry form, when a user clicks a link in this column, the system opens the Projects form in a pop-up window with the selected project details.
- In the Caption column, which is hidden by default, type the caption (name) of the requested column: Project ID.
- In the Quick Filter column, which is hidden by default, select the check box for the added row.
- On the form toolbar, click Save.
You have added the row that corresponds to the Project ID column. Currently, it is the last row (as shown below), so Project ID will be the rightmost column on the generic inquiry form.

In the next step, you will move the row so that the column appears in the needed place on the inquiry form.
Step 3: Moving the Row and Previewing Your Changes
To move the new row and preview the resulting generic inquiry form, do the following:
- While you are still viewing the Generic Inquiry (SM208000) form with the DB1-ARInvoicesMemos generic inquiry selected, again open the Results Grid tab.
- Drag the added row immediately after the row that holds the reference number information (that is, the row with a Data Field setting of RefNbr).
- On the form toolbar, click Save.
- Click the eye icon on the side panel to preview how your changes have affected
the resulting generic inquiry form (which has the Invoices and Memos with
Projects site map title). Notice that the Project
ID column has been moved after the Reference
Nbr. column (shown below) so that an accountant can see the
related projects while viewing the list of invoices and memos in the results
grid.
Figure 2. The Invoices and Memos with Projects generic inquiry form 
