Dynamics 365 Business Central: finally we’ll have TRUNCATE table in SaaS.
Business Central version 27 introduces the Rec.Truncate AL method to enable efficient bulk deletion of table rows in SaaS environments. This method supports filters and AutoIncrement field management but has limitations including no support for OnDelete triggers, media fields, or use within try functions.

post Stefano Demiliani
"This method lets developers delete table rows, matching filters in the most efficient way."
Key points
- Business Central version 27 adds the AL method Rec.Truncate on the Record API to delete table rows matching filters as efficiently as possible
- Parameters let you check whether a table cannot be truncated and choose whether AutoIncrement fields restart at 0 or keep their previous value
- With filters, the platform moves the kept data to a temporary table and back, so filters are only worth using when deleting many rows
- The user needs delete permission and must have no security filters on the table
- Not supported: tables with OnDelete triggers or event subscriptions, media or mediaset fields, use inside try functions, and filters on FlowFields; IF Rec.Truncate THEN can be used to fall back to DeleteAll
Quotes
- “This method lets developers delete table rows, matching filters in the most efficient way.” (Describes the core capability of Truncate for efficient bulk operations that are significantly faster than DeleteAll)
- “Only use filters when you’re deleting significant numbers of rows (using filters for smaller deletions creates unnecessary overhead).” (Important performance guidance for developers to avoid overhead when using the feature)
Context
- Features: Truncate method, bulk deletion, filter support, AutoIncrement management, efficient data removal
- Versions: 27
Source: Stefano Demiliani, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.