如何获得班级来电者姓名?

时间:2016-01-25 11:54:23

标签: axapta dynamics-ax-2012 x++

我的问题很简单,但我不知道该怎么做。

我在表中有一个方法,我想得到类调用者。

我使用了这段代码:

Args _args = new Args();

但我不会'知道如何使用获取名称类。

谢谢大家!

3 个答案:

答案 0 :(得分:5)

您应该使用此方法获取名称或classId。

Args args = new Args();

args.caller(SalesFormLetter::construct(DocumentStatus::Invoice));

info(strFmt("%1", classId2Name(classIdGet(args.caller()))));

特别是:

  

classId2Name(classIdGet(args.caller()))

答案 1 :(得分:1)

尝试使用:

<强> _args.caller()。名称()

示例:

if(_args.caller()&amp;&amp; _args.caller()。name()== classstr(LogisticsLocationSelectionLookup)) { ... }

见链接:

http://kiwiaxguy.blogspot.com.br/2011/02/checking-to-see-if-caller-is-form.html

答案 2 :(得分:1)

除非您明确地将其作为方法的参数提供,否则您无法从表方法访问调用者。

嗯,有var helper = new THREE.BoundingBoxHelper( mesh ); scene.add( helper ); 但它应该用于debugging或仅用于诊断。