web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to check the caller class

(0) ShareShare
ReportReport
Posted on by 115

Hi All,

Can any one please guide me how can I check from which class the code has been called.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Faisal Fareed Profile Picture
    10,796 User Group Leader on at

    Hi,

    Not sure If I get your question completely or not but this is the way to check the caller here I am checking if the class from where the particular code is being called is PurchPurchOrderJournalPrint

    if (classIdGet(_args.caller()) == classNum(PurchPurchOrderJournalPrint))

    Please put more description about your business scenario if it does not help you.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    xSession::xppCallStack contains the current call stack, from which you could read out the call sequence.

    https://blogs.msdn.microsoft.com/mfp/2013/10/02/x-debugging-tips-and-tricks-2-xsessionxppcallstack/

    Please note that you get the same result by putting a breakpoint in, running the process, and checking the call stack.

    Do not debug in Production.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans