Business Central – New possibility of temporary tables

The Business Central 2020 wave 2 (17) version launched a new functionality – creating temporary tables. This avoids unnecessary schema synchronizations.


Previously, it was possible to mark variables on tables, i.e. of type Record, as temporary. The advantage of this is that the data is not stored in the database, but is only kept in the main memory (of the server). This allows for faster processing by reducing the burden on both the network and the database.

A use case is to create statistics because you can only calculate this data at run time for the user and discard it after the call.

Buffer tables are another wide range of applications. These are only used at run time, for example during the execution of a report, to be filled.

Temporary Record Variable

Later, there was the possibility to mark base tables of pages as temporary. This functionality is also used here especially for the creation of statistics.

Property SourceTableTemporary at Pages

New from version 17.0:

Now the use of temporary tables has been extended so that a table can be marked as temporary immediately when created using the TableType property.

TableType property for tables

The behavior is the same as for temporary record variables and temporary tables as the basis of pages. The advantage here, however, is that the schema of this table is not synchronized with the database. The performance of BACPAC creation can also be improved.

The TableType property can be set from Normal to Temporary and return.

However, if you set the TableType from Normal to Temporary and there are data in the Table, you must do a schema synchronization with the ForceSync option.

My personal conclusion

This new way of working with temporary tables not only provides performance-level benefits, but also prevents problems and errors if a programmer uses a buffer table in a variable without setting it to temporary.

Leave a Reply

Your email address will not be published. Required fields are marked *