The following question is for AX7 / Dynamics 365 for Operations.
I have a need for capturing the event of a user navigating around in the user interface from code. It doesn't matter if it is the event of the browser navigating to the site, when any form opens or something else. The important thing for me is that I can capture which company the user is navigating around in and when the last action happened.
Is there any delegate or something in the framework that I can subscribe to (form load, menu load, user action etc.)?
If this is for troubleshooting any kind of error or unexpected behavior, you can take a trace and then open it with Trace Parser.
Trace will contain every action the user has done and every code this action has executed (incl. database queries).
+info: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/perf-test/trace-parser
Telemetry can be accessed from LCS, whilst it has a format difficult to understand.
To your question, it will not be recommended to trace to this low level for every user as a long term monitoring, that's why there is no delegate nor any extension point to do that. That will generate an excessive overload to the system.