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)
Suggested Answer

Access CallContext information from X++ service operation

(0) ShareShare
ReportReport
Posted on by 1,719

Hi guys,

I've been investigating if is it possible to access the CallContext information that you provide from external applications that call the AX services, during the service operation execution in X++. It would be usefull to catch the MessageId guid from inside X++ on each execution of the service for advanced logging and then link with this messageId to the Exceptions and History AIF standard forms.

Any help on this subject will be welcome!

Thanks!

*This post is locked for comments

I have the same question (0)
  • Ali R Profile Picture
    1,040 on at

    Did you find out any answer? I have same issue.

  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Use messageId() in AifMessage class.

  • jaestevan Profile Picture
    1,719 on at

    Thanks Martin,

    I found this method on the documentation (MSDN) but I never found a way to use it from the standard code. If you call this method from the service processor classes, it always returns an empty guid (00-00-00...).

    If you have any example or experience with this let me know so we can do some testing ;)

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    I know that AX logs message ID to history (System administration > Periodic > Services and Application Integration Framework > History). It seems to be handled by AifMessageManager.createInternal(). I also sometimes used messageId() in debugging.

    Try to configure logging and review history. If you see message IDs there, it obviously gets into AX and you can work with it. You're probably just doing it in a wrong moment.

  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at

    you can use CallContext.MessageId

    for further detail:

    dynamicsaxforum.blogspot.com/2014_02_01_archive.html

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