A couple of years back I wrote a post on a workflow hierarchy limit checker job. It was a simple job that took a starting worker and traversed up the hierarchy. It printed the userid/worker/position/manager/spending limit/approval limit in an info log.
Today I rewrote it slightly to use a dialog for D365FO. Since it is not possible to change the code that easily in D365. This currently only works for Expenses. Its not pretty at the moment but it works.
I intentionally left the error in there. This will print the same error as what the workflow engine would. Hopefully this would give you a clue on where it stops.
Hopefully I can come back and extend it to the other document types such as purchase requisition and purchase orders.
Code is available on GitHub. I gave it a generic name like “Workflow plus”. I hope to add a few other nice commonly used workflow enhancements to it.
Another common enhancement I can think of is - Purchase order spending and approval limit; currently you don’t have this on the document. It is not possible to create a stop condition based on approval/spending limits
You can run the job via the url. Later hopefully I can add a menu item and security to it.