Hi friends, my name is Antony.
I recently encountered an error when I posted a Job Card on a Production Order.
The error says:
Unable to cast object of type 'Dynamics.AX.Application.ProdRouteJob' to type 'Dynamics.AX.Application.ProdJournalBOM'.

I've tried to debug this line of code by putting a breakpoint on the class that runs on Post Button and also attaching the process to w3wp.exe.

Then the error appears in output window, but I don't know how to find out which method/class/line is causing the error.
Is this method of debugging is correct? How do I find the line/method that is causing the error?
Any suggestions will be very helpful. Thank you.