英文:
How to get ARGS from XppPrePostArgs in extension methos?
问题
我扩展了_main_类方法,我想从XppPrePostArgs在D365环境中获取Args。
[PreHandlerFor(classStr(MYCLASS), staticMethodStr(MYCLASS, main))]
public static void MYCLASS_Pre_main(XppPrePostArgs args)
{
// 如何将 args 转换为
// 从 XppPrePostArgs 获取 Args
}
英文:
I extended the main class method, I would like to get from XppPrePostArgs the Args in D365 environment.
[PreHandlerFor(classStr(MYCLASS), staticMethodStr(MYCLASS, main))]
public static void MYCLASS_Pre_main(XppPrePostArgs args)
{
// HOW TO CONVERT args to
// from XppPrePostArgs get Args
}
Thanks.
答案1
得分: 2
你并没有按传统的继承方式进行任何转换。你正在使用XppPrePostArgs
来获取事件的变量。
// 将"_args"更改为参数变量的名称
Args args = _xppPrePostArgs.getArg("_args");
英文:
You're not converting anything in the traditional inheritance sense. You're using XppPrePostArgs
to obtain the event's variable(s).
// Change "_args" to whatever the argument variable name is
Args args = _xppPrePostArgs.getArg("_args");
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论