community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Dynamics 365 Business Central: locking down IsolatedStorage reads.

Starting with runtime version 18.0, the IsolatedStorage.Get method accepts an optional IsolationLevel parameter to prevent race conditions during concurrent read-modify-write operations. The new UpdLock isolation level holds an update lock on a key's row during reads, blocking other sessions until the transaction completes, protecting sensitive data like secret keys, feature flags, and cached tokens from concurrent corruption.

post Stefano Demiliani

Stefano Demiliani · 2026-09-14 · 409 words · about 2 min

"two sessions read the same key at the same time, both compute a new value, and one of them silently overwrites the other."

Key points

  • IsolatedStorage.Get now accepts an optional IsolationLevel parameter to control how the key row is locked during reads
  • IsolationLevel::UpdLock holds an update lock until the transaction ends, preventing other sessions from reading or writing the same key
  • This protects read-modify-write patterns commonly used for secret keys, feature flags, and cached tokens
  • Available in runtime version 18.0 and later; earlier versions require alternative locking strategies

Quotes

  • “two sessions read the same key at the same time, both compute a new value, and one of them silently overwrites the other.” (Describes the core race condition problem that the new feature solves)

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.

  • other “IsolatedStorage”

Context

  • Features: IsolatedStorage locking, isolation levels, update locks, concurrent access control, read-modify-write transactions
  • Versions: 18.0

Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.