General X++ Development

How do I find which method is creating or updating a record in D365FO?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

How do I find which method is creating or updating a record in D365FO?

SSunny Vasty90 reputation · answered Aug 13, 2026

Put a breakpoint on the table's insert() or update() method and reproduce the action.

When the breakpoint hits, look at the call stack.

That immediately tells you how execution got to the table.

For updates, also compare the current buffer to orig() so you can see which fields actually changed.

This is usually much faster than searching through 50 classes and guessing which one might be responsible.