How to determine axapta class name from class id?

Please, can someone help me sort out the madness of the Party?

I am trying to debug an implementation of Axapta 3.0, which has about 50 batch jobs. Most classes with a package do not implement the description() method, therefore, when viewing the package list form (Basic → Requests → List of lots), the description field is empty. You can see the Group Group and Start Time , etc., but you cannot tell which class is actually being called.

The Batch table contains a hidden ClassNum field that identifies the class ID property. Can someone tell me how can I find the appropriate class from ID? Once I have identified the perpetrators, I can add descriptions.

I tried using the standard search function on AOT, but it does not pick them up.

Any suggestions would be greatly appreciated!

Thanks a lot, Mike

+4
source share
2 answers

Answer Jay provides two complete solutions.

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

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

At least two ways to do this, you can use the DictClass class:

 display ClassName className() { DictClass dictClass = new DictClass(this.ClassNum); ; if(dictClass!=null) return dictClass.name(); return ''; } 

Or using the UtilIdElements table:

 display ClassName className() { UtilIdElements utilIdElements; ; select utilIdElements where utilIdElements.id==this.ClassNum && utilIdElements.recordType==UtilElementType::Class; if(utilIdElements) return utilIdElements.name; return ''; } 
+2
source

Source: https://habr.com/ru/post/1277518/


All Articles