如何在不同版本之间保留单个XPO?

发布于 2024-09-08 18:20:44 字数 148 浏览 6 评论 0原文

我想要一台 XPO,并在 AX4 和 AX5 上使用相同的代码。我正在寻找一个预编译器指令来检查版本,有点像:

#if define AX4
  thisCode(...)
#else
  thatCode(...)
#endif

I want to have one XPO, and have the same code work on AX4 and AX5. I am looking for a precompiler directive to check the version, sort of like:

#if define AX4
  thisCode(...)
#else
  thatCode(...)
#endif

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

錯遇了你 2024-09-15 18:20:44

看起来 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

It looks like the SysDataExpImp macro library may have a version based macro called expFormat which you could use like this:

#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

You could also use a macro that is only found in AX 2009. The AotExport macro library has macros for each type of AOT object and Data Sets were introduced in 2009:

#AotExport
#if.expDataSet
info('Microsoft Dynamics AX 2009');
#endif
#ifnot.expDataSet
info('older than Microsoft Dynamics AX 2009');
#endif
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文