如何从类ID识别Axapta类名称? [英] How can I identify an Axapta class Name from the class ID?

查看:65
本文介绍了如何从类ID识别Axapta类名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请有人能帮我弄清批量疯狂吗?

Please can someone help me make sense of the Batch madness?

我正在尝试调试大约50个批处理作业的Axapta 3.0实现.大多数批处理类都不实现 description() 方法,因此,当您查看批处理列表表单(基本>>查询>>批处理列表)时,描述字段是空白的.您可以看到批次组开始时间等,但是您无法确定实际正在调用哪个班级.

I'm trying to debug an Axapta 3.0 implementation that has about 50 Batch Jobs. Most of the batched classes do not implement the description() method, so when you look at the Batch List form (Basic>>Inquiries>>Batch list) the description field is blank. You can see the Batch Group and the Start Time, etc. but you can't tell which class is actually being called.

批处理表包含一个名为 ClassNum 的隐藏字段,该字段标识该类的 ID 属性.谁能告诉我如何从ID中找到相应的类?一旦确定了罪魁祸首,就可以添加说明.

The Batch table contains a hidden field called ClassNum which identifies the ID property of the class. Can anyone tell me how I can find the corresponding class from the ID? Once I've identified the culprits I can add descriptions.

我尝试在AOT上使用标准的 Find 函数,但没有找到它们.

I tried using the standard Find function on the AOT but it doesn't pick them up.

任何建议都将受到欢迎!

Any suggestions would be most welcome!

非常感谢, 迈克

推荐答案

Jay的答案提供了两个全面的解决方案.

Jay's answer provides two comprehensive solutions.

我刚刚发现全局类 ClassId2Name 做同样的事情,因此您可以简单地做到:

I've just discovered that the global class ClassId2Name does the same thing, so you can simply have:

display str Classname()
{
   return ClassId2Name(this.ClassNum);    
}

这篇关于如何从类ID识别Axapta类名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆