Skip to main content

Notifications

Microsoft Dynamics AX (Archived)
Suggested answer

Access CallContext information from X++ service operation

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

  • Suggested answer
    Bashir Ahmad Profile Picture
    Bashir Ahmad 5,248 on at
    RE: Access CallContext information from X++ service operation

    you can use CallContext.MessageId

    for further detail:

    dynamicsaxforum.blogspot.com/2014_02_01_archive.html

  • Martin Dráb Profile Picture
    Martin Dráb 230,104 Most Valuable Professional on at
    RE: Access CallContext information from X++ service operation

    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.

  • jaestevan Profile Picture
    jaestevan 1,719 on at
    RE: Access CallContext information from X++ service operation

    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 ;)

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,104 Most Valuable Professional on at
    RE: Access CallContext information from X++ service operation

    Use messageId() in AifMessage class.

  • Ali R Profile Picture
    Ali R 1,040 on at
    RE: Access CallContext information from X++ service operation

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,104 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans