Create a Query on the Products Table for the Workflows to Reference
Before we move on to the next step and create the workflow template, there is one final step, and that is to create a query onto the base table, in this case InventTable, that we will be able to mark as dynamics and then use within the Workflow Wizard.
NOTE: This is part of the Developing a Product Approval Workflow in Dynamics AX 2012 blog series where we show how to develop a completely new workflow to manage the new product approval process. If you want to see all of the other posts in this series, click here.
How to do it…
To create a simple query on the products table, follow these steps:
- Open up the AOT workspace so that you have both the Workflow Project and the AOT tree displayed.
- Within the AOT tree, open up the Tables group within the Data Dictionary and find the InventTable table.
- Right-mouse-click on the root of the project tree and select the Query option from the New sub-menu to create a new Query element.
- Change the Name property to ProductApprQuery.
- Open up the ProductApprQuery within the project and drag the InventTable table from the AOT explorer over into the Data Sources.
- Select the Fields from within the InventTable_1 Data Source, and change the Dynamic property to Yes.
- Now save your project to make sure that nothing broke before continuing on.