Search code examples
axaptadynamics-ax-2012x++

How to get Class caller name ?


my question is simple, but I don't know how to do .

I have in a Table a method, I want to get the class caller.

I used this code :

Args _args = new Args();

but I dont' know how to use for get the name class.

thanks all!


Solution

  • You should use this method to get the name or classId.

    Args args = new Args();
    
    args.caller(SalesFormLetter::construct(DocumentStatus::Invoice));
    
    info(strFmt("%1", classId2Name(classIdGet(args.caller()))));
    

    Specifically this:

    classId2Name(classIdGet(args.caller()))