Business Central 2025 wave 2 (BC27): Add LockTimeoutDuration allow increasing/lowering lock timeout instead of only disabling/enabling it (New Database.LockTimeoutDuration Method)
BC27 (2025 wave 2) adds the Database.LockTimeoutDuration method. It gets or sets the lock timeout in seconds, so developers can raise or lower the timeout instead of only switching it on or off with Database.LockTimeout. It needs runtime 16.0 or later.

post Dynamics 365 Lab
"Gets or sets the current lock timeout duration in seconds. Setting a lock timeout of 0 or less disables the lock timeout."
Key points
- Database.LockTimeoutDuration takes an optional integer and returns the current lock timeout in seconds
- A value of 0 or less turns the lock timeout off
- The older Database.LockTimeout method only toggles the timeout and cannot change its duration
- The default timeout shown is 30 seconds
- Runtime 15.0 gives error AL0666; runtime 16.0 or later is needed, and the data type name can be left out when calling the method
Quotes
- “Gets or sets the current lock timeout duration in seconds. Setting a lock timeout of 0 or less disables the lock timeout.” (Explains the core functionality of the new method and how to disable timeout completely)
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 “Database.LockTimeoutDuration Method”
- other “Database.LockTimeout Method”
Context
- Features: Database.LockTimeoutDuration method, Lock timeout duration control, Configurable lock timeout in seconds
- Versions: BC27, 2025 wave 2, runtime version 16.0
Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.