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 :
Finance | Project Operations, Human Resources, ...
Answered

How to debug server side methods in D365

(0) ShareShare
ReportReport
Posted on by 290

I have read some tutorials for configuration AOS to enable debugging on the server side. But All of them are for AX 2012.

I want to know how can I debug my server side method which is written in the custom view in dynamic 365?

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

    All code in D365FO runs on server. So, general D365FO debugging process will work.

  • Nastaran Profile Picture
    290 on at

    I insert a break-point in my server method which is assigned to the computed column. this break point is not hit. By any chance is there any configuration I have missed?

  • Suggested answer
    Pete Alberts Profile Picture
    3,542 on at

    Computed columns aren't run-time, but compile time. When a computed column field from your view or DE is read no code fires - it's pure SQL.

  • Pete Alberts Profile Picture
    3,542 on at

    What do you mean with "my server method which is assigned to the computed column"? On what element is this element and when is it called?

  • Pete Alberts Profile Picture
    3,542 on at

    As a side question Nikolaos - code that runs in batch. I've had an issue where I needed to debug a job while it is running in batch (I couldn't let it run in the session). Is there a way to achieve debugging when a job is run in batch?

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

    Pete,

    if you want to debug a batch you should attach to the batch server process instead of w3wp/iisexpress.

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

    Nastran, computed columns are not executed in Dynamics server (AOS), they are executed in SQL Server. Dynamics installer / sync engine simply tells SQL Server to create the computed column during database synchronization. You can't debug database sync, or the execution of the logic in the computed column.

  • Evaldas Profile Picture
    1,800 on at

    To test the computed column, try this:

    If your view synchronized:

    Go to SQL Server Management Studio and find the view that you created a computed column to.

    Right-Click > Script View as > CREATE to and you will get the VIEW definition where you will be able to see what computed column you have created.

    If your view did not synchronize but compiled:

    Try creating a similar method in a runnable class and info it as a message, so you know what you are getting.

  • Nastaran Profile Picture
    290 on at

    Dear Pete ,

    I have a veiw with prodcalcTrans datasource. my goal is adding resource name as a computed column to this view. Because the resource name is obtained by display method and it is not stored as a field in prodcalctrans table. so In my view I have three fields (1) resource (2) calcType (3) resourceName(which is computed column).

  • Evaldas Profile Picture
    1,800 on at

    And if you want to test the value it's getting when just open that view in Table browser or select in SQL Server Management Studio.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans