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.
To work through this recipe, you will need to have AX 2012 R2 or AX 2012 R3 rich clients with developer permission.
Firstly, go to AOT | Data Dictionary | Maps, right-click the node and create a new map named
PKTSalesPurchTransferMap
.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...