web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to detect that a user session is terminated?

(0) ShareShare
ReportReport
Posted on by 10

Back in NAV, codeunit 1, we could subscribe to the event that tells that the user session is about to be closed, and put code in the subscriber to do some housekeeping, e.g. if your app uses records where the PK is SessionID you could delete them from a given app-related control table.

Now that in Dynamics 365 BC we don't have codeunit 1 anymore, what resource (e.g. codeunit event) could we subscribe to do a similar work?

Many thanks!

I have the same question (0)
  • Verified answer
    I Gusti Made Ari Profile Picture
    3,600 on at

    Check the  codeunit 40 LogInManagement , subscribe to event OnAfterLogInEnd

  • J. Leite Profile Picture
    10 on at

    Great, many thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,785

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,007 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 948 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans