Creating reports by fetching the data using maps
Maps unify access to similar columns and methods that are present in multiple tables and views. Maps enable the use of the same field name to access fields with different names in different tables. We will map all the three view fields created in the previous recipe with the map fields.
Getting ready
To work through this recipe, you will need to have AX 2012 R2 or AX 2012 R3 rich clients with developer permission.
How to do it...
- Firstly, go to AOT | Data Dictionary | Maps, right-click the node and create a new map named
PKTSalesPurchTransferMap
. - Add the fields in the map created in the previous step.
- Now, we will add all the above created three views in the mapping node of the map and map the fields of view with the fields of maps.
- After mapping the fields, we will add a method in the map to insert the data into a temporary table.
public static void insertTableTmp( PKTTmpTable _pKTTmpTable, PKTSalesPurchTransfer _pKTSalesPurchTransfer...