community postAdministration & Setupcommunity - not Microsoftreviewed - checked by Opus

Who Keeps Moving My Business Central Work Date?

The Work Date setting in demo companies like Cronus automatically resets to the posting date of the last G/L Entry on every login or session refresh, rather than preserving the user's configured value. Use an event subscriber on the OnAfterLogin event to override this behavior and set the Work Date to today's date instead.

post Mohana's Dynamics NAV & BC blog

Mohana Yadav · 2026-03-10 · 503 words · about 2 min

Key points

  • Codeunit 40 (LogInManagement) calls GetDefaultWorkDate() which retrieves the posting date from the most recent G/L Entry for demo companies
  • The Work Date resets every login, session timeout, or browser refresh to whatever that G/L Entry date is, overriding user settings
  • This affects consultants, partners, and businesses running on demo or evaluation environments that still have the IsDemoCompany flag set to true
  • Subscribe to the OnAfterLogin event from Codeunit 150 (System Initialization) and call WorkDate(Today) to force the Work Date to today before users see any pages

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

Context

  • Features: Work Date management, Login event handling, Demo company default behavior, G/L Entry posting date tracking, Event subscriber pattern, Session initialization

Source: Mohana’s Dynamics NAV & BC blog, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.