Canvas App Error: “Row Size Exceeded” – Causes, Fixes, and Best Practices
When building Canvas Apps with Dataverse, you might see this error:
The total size of the columns used in the database command exceeded the database limit.
Cannot create a row of size 8087 which is greater than the allowable maximum row size of 8050.
Why This Happens
Dataverse runs on top of Azure SQL and follows its row size limit (\~8 KB).
Here’s why you might hit this error:
1. Too Many Columns Selected
Canvas Apps often load all columns by default, including:
- Text and memo fields
- Lookup and choice fields
- Images and files
- Calculated or rollup fields
2. Temporary SQL Row Exceeds 8 KB
- Behind the scenes, Dataverse queries try to build a temporary row.
- If the sum of all columns exceeds 8,060 bytes, SQL blocks the operation.
How to Fix the Row Size Issue
1. Only Select Required Columns
Use `ShowColumns()` to reduce row size:
ClearCollect(
colContacts,
ShowColumns(
Contacts,
"contactid",
"firstname",
"lastname",
"emailaddress1",
"mobilephone"
)
)
This avoids large and unused columns like `Notes`, `Owner`, or `Image`.
2. Avoid Large Fields in the Main Query
- Skip Images or Files in galleries.
- Load multiline text fields only when needed.
- Use `LookUp` or `OnSelect` to fetch details on-demand.
3. Use Delegation and Filtering
Never load the entire table if unnecessary:
ClearCollect(
colContacts,
ShowColumns(
Filter(Contacts, StartsWith('First Name', TextSearchBox.Text)),
"contactid", "firstname", "lastname", "emailaddress1"
)
)
Keeps rows smaller and queries faster.
4. Split Large Tables
If your table has 100+ fields:
- Move rarely used fields to a related child table.
- Keeps your main table lean and performant.
5. Leverage Dataverse Views
Create a Dataverse view that includes only the columns your app needs.
- Connect Canvas App to the view instead of the full table.
- This drastically reduces row size and avoids SQL errors.
Quick Fix Example
Instead of loading everything from Contacts:
ClearCollect(
colContacts,
ShowColumns(
Contacts,
"contactid", "firstname", "lastname", "emailaddress1", "mobilephone"
)
)
This reduces row size, prevents SQL errors, and speeds up your Canvas App.
Pro Tips for Developers
- Avoid Select All Columns in galleries or data collections.
- Monitor delegation warnings to prevent partial data loads.
- Optimize performance and memory usage with lean queries.
Summary:
The Dataverse row size limit in Canvas Apps is governed by SQL Server’s 8 KB (8,060 bytes) per-row limit. Exceeding this limit can occur when tables have too many text columns, lookup/choice fields, or file/image columns. When this happens, saving or retrieving data in Canvas Apps can fail.
To avoid this, follow best practices:
- Select only the required columns in your queries.
- Avoid pulling large fields (like file/image) in your main queries.
- Use filtering and delegation to limit the data retrieved.
- Consider connecting your Canvas App to Dataverse views optimized for performance.
By carefully managing the row size and retrieved fields, architects and developers can prevent database errors and ensure smooth Canvas App performance.
Published on:
Learn moreRelated posts
Dynamics 365 Field Service : Create task-specific canvas apps and custom pages
Field technicians are the backbone of any service-centric organization. But their success depends on having the right tools at their fingertip...
Automating UI Testing for Canvas Apps with Power Platform Test Engine
Canvas Apps in Power Platform provide a flexible way to build rich, custom user interfaces using a low-code approach. However, as these apps g...
User-Defined Function (UDF) in Power Apps Canvas App – EMI Calculator Example
In this blog you will know about User-Defined Function (UDF) in Power Apps Canvas App with a EMI Calculator Example Watch the video below or s...
🔓 Understanding the “Access app scope” Feature in Canvas App Components (Power Apps)
💡 Introduction In Power Apps Canvas Apps, components play a crucial role in building reusable UI and logic blocks. However, traditionally, co...