1
我想要一個XPO,並且在AX4和AX5上有相同的代碼工作。我要尋找一個預編譯器指令檢查版本,有點像:如何在不同版本中保持單個XPO?
#if define AX4
thisCode(...)
#else
thatCode(...)
#endif
我想要一個XPO,並且在AX4和AX5上有相同的代碼工作。我要尋找一個預編譯器指令檢查版本,有點像:如何在不同版本中保持單個XPO?
#if define AX4
thisCode(...)
#else
thatCode(...)
#endif
它看起來像SysDataExpImp
宏庫可以有一個版本基於宏觀稱爲expFormat
,你可以使用這樣的:
#SysDataExpImp
#if.expFormat('EXPFORMAT VER. 5.0')
info('Microsoft Dynamics AX 2009');
#endif
#if.expFormat('EXPFORMAT VER. 4.01')
info('Microsoft Dynamics AX 4.0 SP1');
#endif
你也可以使用只在AX 2009中發現的AotExport
宏庫已經爲每種類型的AOT對象和數據集的宏在2009年推出的宏:
#AotExport
#if.expDataSet
info('Microsoft Dynamics AX 2009');
#endif
#ifnot.expDataSet
info('older than Microsoft Dynamics AX 2009');
#endif