Dynamics AX Knowledge

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Map is a collection.Have two types map。
1. Map is such as a class or object
Map    myMap   = new Map(types::string,types::integer);
myMap.insert("ABC",11);
myMap.insert("DEFG",23);
print myMap.toString()
pause;

2. Table Map
1),Create a Map such as CustVendTrans in Map of Data Directory node;
2),Create Fields on the CustVendTrans;
3),Create two Mappings on CustVendTrans with CustTrans and VendTrans;
4),Create methods on the CustVendTrans, All method will share for CustTrans and VendTrans Tables such as remainAmountCur() method:
display AmountCur remainAmountCur()
{
    return this.amountCur - this.settleAmountCur;
}
5),In CustTrans and VentTrans Table, we have a method named remainAmountCur() also, Format is Table.MapName::MethodName;
display AmountCur remainAmountCur()
{
    return this.CustVendTrans::remainAmountCur();
}
6), So we use remainAmountCur() in CustTrans and VendTrans tables and this method's function is the same in two tables.
So, table map is like as inherit

posted on 2007-12-25 10:57  Jacky Xu  阅读(350)  评论(0编辑  收藏  举报