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 moreWe can help you with Canvas App Error: “Row Size Exceeded” – Causes, Fixes, and Best Practices
If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.
Related posts
From Conversations to Automation: Understanding Microsoft Copilot Studio
In November 2023, Microsoft announced that Power Virtual Agents was becoming part of Microsoft Copilot Studio. Microsoft now characterizes Cop...
Copilot Studio: Agent Integration Approaches — Tools, Knowledge, and Agents
In Copilot Studio, agent integration employs the same fundamental integration concepts and patterns used in traditional enterprise integration...
Copilot Studio: How to Plan Integration with Enterprise Systems
Integrating Microsoft Copilot Studio agents with enterprise systems transforms a basic chatbot into a secure, intelligent digital teammate tha...
Book Review : The Manager 's Path : A Guide for Tech Leaders Navigating Growth and Change by Camille Fournier
After a long time, I came across a book that is truly valuable for engineering students and professionals, especially those working in t...
Power Platform Environment Deep Dive (Part 2)
In Microsoft Power Platform, choosing the right environment type is important because each environment is designed for a different business pu...
Power Platform Environment Deep Dive (Part 1)
Today, in the business enterpriese world, Power Platform enables organization to build application, automate workflow, analyze data crea...
Book Review : Life 3.0 by Max Tegmark
This is the third book I’ve read this year, and even though I’m still in the early chapters, it already feels like my favorite read of the yea...
Dataverse Views Demystified: Making Data Work for You
In Microsoft Dataverse, users do not always see all the data stored in a table. What they can view depends on their security permissions, role...
