Recently I worked on something very interesting related to a integration between MS Dynamics Nav and an external payment service provider. I had to use custom Cross Session Events to solve a problem which I think it’s worth sharing. So this why this post.
In Microsoft Dynamics NAV you can fire a function whenever something changes within your session (and from NAV 2016 this is even easier with the new Event model), however there is not an easy way to know what is happening in other sessions. Sometimes you would like to know what has happened since your last read, without reading everything again, e.g. when you need to pass a large dataset to a Control Add-in.
Have seen many of the forum users are posting question on how to find active user sessions in an instance of Microsoft SQL Database Engine.
In order to get the current users, sessions, and processes in an instance of the Microsoft SQL Server Database Engine, we can use the “sp_who2” SQL stored procedure.
Finally! How many hours have I spent debugging sessions without UI with MESSAGEs and ERRORs… The good old days.
If you have done that, like me, then you will probably agree that it was not the most elegant way of finding the source of the problem. Have you ever forgotten to delete a funny MESSAGE after a session debugging with that method and had the client bring it up? I know I have.