Skip to main content

Notifications

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.

  • Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    RE: How to debug the Table event handler code and Table method in Visual Studio

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

  • learner.d365 Profile Picture
    learner.d365 35 on at
    RE: How to debug the Table event handler code and Table method in Visual Studio

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

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    RE: How to debug the Table event handler code and Table method in Visual Studio

    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.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: How to debug the Table event handler code and Table method in Visual Studio

    Hi, Please check this article

    dynamics365musings.com/.../

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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans