IF (SESSION.CURRENTEXECUTIONMODE = EXECUTIONMODE::Standard) AND (SESSION.CURRENTCLIENTTYPE = CLIENTTYPE::Windows) THEN BEGIN ActiveSession.SETRANGE("User ID",USERID); ActiveSession.SETRANGE("Client Type",ActiveSession."Client Type"::"Windows Client"); ActiveSession.SETFILTER("Session ID", '<>%1', SESSIONID); IF ActiveSession.FINDFIRST THEN IF CONFIRM(OpenNewSessionConf) THEN STOPSESSION(ActiveSession."Session ID") ELSE ERROR(TooManyOpenSessionsErr); END;
Answers
In newer versions, multiple clients from the same user shouldn’t eat up licenses.
Create a function in codeunit 1 and check on open company if user has client running, if windows, or check the sessiontable.
There is no way to map NST sessions visible at the SQL server to actual users sessions - unless you set up one NST per one user, and each NST will run under different service account
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
This has solved the issue for us, hope this helps.
Thanks for this suggestion - this is a perfect solution
You can try achieving this by using the Idle Client Timeout feature in NAV.
So that system will automatically close / Kill the idle sessions after a specified interval of time.
Thanks