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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Working in Job not in class

(0) ShareShare
ReportReport
Posted on by

I consumed web services from external application and invoked the classes and method using CLRInterop.

My job is executing fine, when i add the piece of logic inside the class it worked , Today morning when i test the class its not executing , I am not able to catch the exception . Class property run on 'server'.

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    When you say "it's not executing", what exactly do you mean? Do you mean that your latest changes that you added don't seem to be there?

    Remember that if you change the x++ code, you need to generate CIL or your service calls will still use the old version of the code. Perhaps this explains your issue.

  • Community Member Profile Picture
    on at

    I restarted the AOS, I can able to see the updated code, Exactly in the executemethod from reference its not working, but in job the same method executes.

  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    Being able to see the updated x++ code doesn't mean that your CIL is up to date.

  • Community Member Profile Picture
    on at

    I'm using AX2009

  • nmaenpaa Profile Picture
    101,172 Moderator on at

    Ah, ok, then there's no CIL.

    Then may I ask you to provide more details about your issue?

    1) Please share your code

    2) Did it work before your latest code changes?

    3) Do you get some error?

    4) Please describe in detail what you input in the service call and what doesn't work as expected

    5) Please let us know what you mean by "in the executemethod from reference its not working"

    Thanks!

  • Community Member Profile Picture
    on at

    That's where I struck , I used AifUtil::getCLRErrorMessage(),but still i cannot able to catch the exception inside class.

  • nmaenpaa Profile Picture
    101,172 Moderator on at

    But do you know that an exception happens? Could you please go through my five questions above and answer all of them? Thanks!

  • Suggested answer
    Community Member Profile Picture
    on at

    Change the properties "Run on" to server or add key word "Server" in the beginning.

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 461 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 445

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 440 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans