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

Announcements

No record found.

News and Announcements icon
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

  • 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
    241,313 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
    241,313 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans