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!