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

How to debug the Table event handler code and Table method in Visual Studio

(0) ShareShare
ReportReport
Posted on by 35

[DataEventHandler(tableStr(InventTable), DataEventType::Inserting)] public static void InventTable_onInserting(Common sender, DataEventArgs e) { InventTable inventTable = sender as InventTable; inventTable.MyInventLocationId = inventTable.inventLocationId(); }

public display InventLocationId inventLocationId( InventLocationId _inventLocationId = '', InventDimId _inventDimId = InventDim::inventDimIdBlank(), InventSiteId _inventSiteIdParent = '') { return this.inventItemInventSetup(_inventDimId).inventLocationId(_inventLocationId, this, _inventSiteIdParent); }

I written onInserting event Handler code in a class for filling myinventlocationId field with Inventlocationid () method in InventTable.

Inventlocationid () is a standard display method.

But the issue I'm unable to fill myinventlocationId field by calling this method in Table event handler.

Now I need to debug this event handler and inventLocationId() method for finding what happened with event handler code.

Can you please tell the process how to debug both event Handler and inventLocationId () ?

Where I need to put breakpoints and step over step into .

Explain me how to debug in this scenario.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,573 Moderator on at

    Hi, Please check this article

    dynamics365musings.com/.../

    Keyboard keys F10 for step over and F11 for Step into.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    I think you cannot call a display method at a table in this way. So better, use the code in the display method. Because display method is only used to display in the form.

    To debug, put breakpoint inside the method, attach to process try insert something from UI or through a runnable job and start debugging.

  • learner.d365 Profile Picture
    35 on at

    Thank you Mohit Rampal sir and Thank you Bharani Preetham peraka sir

  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    If your issue is resolved please verify the ans so that it can be helpful for future.

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

#1
Martin Dráb Profile Picture

Martin Dráb 523 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 408 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 354

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans