Business Central 2025 wave 1 (BC26.2): Implicit conversion between Record and RecordRef
Business Central 2025 wave 1 introduces implicit conversion between Record and RecordRef data types, allowing direct assignment in both directions without calling GetTable or SetTable methods. This simplifies code when working with dynamic table references, available in runtime version 15.2 and above.

post Dynamics 365 Lab
"We have introduced support for implicit conversion between Record and RecordRef instances, allowing direct assignment between these types."
Key points
- Record variables can now be directly assigned to RecordRef with implicit conversion, replacing GetTable calls
- RecordRef can be assigned directly to Record variables, replacing SetTable calls
- The feature requires runtime version 15.2 or above; earlier versions show AL0122 compilation errors
- Implicit assignment does not copy filters and views, unlike SetTable with the temporary parameter
- SetTable method with temporary parameter remains necessary for temporary record scenarios
Quotes
- “We have introduced support for implicit conversion between Record and RecordRef instances, allowing direct assignment between these types.” (Explains the core feature that simplifies AL code by eliminating the need for GetTable and SetTable method calls)
- “in runtime version 15.2 or above, we can do this directly through the assignment statement, RecordRef := Record.” (Clarifies the exact runtime requirement and the new syntax developers should use)
- “This does not replace RecordRef.SetTable(Record, Boolean) Method, for example, MyRecordRef.SetTable(TempCust, true).” (Important limitation showing that SetTable is still required for temporary records where the two-parameter form is necessary)
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.
- codeunit “RecordAndRecordRefConversion”
- table 18 “Customer”
Not found in BC28-30: codeunit “RecordAndRecordRefConversion”.
Heads up
- gotcha: “This will cause an error if the table is different.” (about version BC26)
- gotcha: “It seems that the assignment statement does not copy filters and views.” (about version BC26)
- breaking: “If the runtime is not set to 15.2 or above, the following error will be displayed.” (about version BC26)
Context
- Features: Implicit Record to RecordRef conversion, Implicit RecordRef to Record conversion, Direct assignment between Record and RecordRef, Runtime 15.2 support
- Versions: BC26, BC26.2, 2025 wave 1
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.