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)

How can I set a breakpoint in a calculated field method used in an automatic action test in workflow?

(0) ShareShare
ReportReport
Posted on by 230

I've written a method to return a calculated value as an extension of VendInvoiceDocument. As far as I can tell it works, but I have been completely unable to set a breakpoint in the code. Obviously, I've been attaching to both the w3wp.exe and Batch.exe processes and hit other breakpoints in both, but even putting a breakpoint statement in the extension method didn't cause a break.

What do I need to do to get breakpoints to work in calculated field methods?

Here's a very simplified version of the code:

[ExtensionOf(classStr(VendInvoiceDocument))]

final class VendInvoiceDocument_Extension

{
    public int parmDepot(CompanyId _companyId, tableId _tableId, recId _recId)
    {
        str depot;

        breakpoint;

        VendInvoiceInfoTable vendInvoiceInfo = VendInvoiceInfoTable::findRecId(_recId);

        depot = VendInvoiceInfo.InventSiteId;

        // other stuff here...

        return (-1);
    }

}


*This post is locked for comments

I have the same question (0)
  • DD-19021315-0 Profile Picture
    230 on at

    Update: If it makes a difference, the actual calculated field is only valid when called from the Automatic Actions of an Approval step within workflow. So I can't test it except by submitting a workflow. I assumed the breakpoint would be hit in Batch.exe while the workflow was being processed but it doesn't seem to be.

  • André Arnaud de Calavon Profile Picture
    304,538 Super User 2026 Season 1 on at

    Hi Derek,

    The workflow batch is calling a web service which handles the AX workflows. This service is calling AX logic in return. So in fact another user/process is performing the operation for the calculated method.

    The other process might be not seen by the debugger or it only takes the compiled objects.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans