I have a Canvas app that feeds from data from Dataverse. It has been working as intended for months, but within the last couple of months we have experienced that data is not always completely loaded. Beween 50% and 90% of the data is loaded ... and it seems like each item is randomly chosen.
The images below show our Canvas app. Each row has three galleries and they load data from a View in a Model-driven app and is filtered a bit in each gallery to match each column.
So in total we have
7 Views in Dataverse (Model-driven app)
21 galleries
We only have about 35 items in Dataverse - so amounts of data is really miniscule.
Do you have any idea why this is happening?
Thanks 😊
/Jesper
It also happens in "Edit" mode when I refresh the data source
Notice the difference in the bottom, blue row
I noticed in your video that it is possible to monitor data requests from the app. I opened it and I have discovered a pattern with regards to which data is used.
If I look at the app after a refresh of data, I see this:
So the error occurs in the galleries
Now, if I examine the monitor logs, I see this:
This matches exactly the galleries that are not loaded.
I have reloaded the app and data a few times, and the result is 100% reproducable - every time a gallery is not loaded, I see the error above for that particular gallery.
If I dive into the details of one of them, I get this result:
{
"status": 400,
"duration": 1030.3,
"dataSource": "Topics",
"responseSize": 1033,
"controlName": "Discover_gallery_next",
"propertyName": "Items",
"nodeId": null,
"formulaData": {
"script": "Filter(Topics, 'Topics (Views)'.'Current and future topics - discover', Pipeline = 'Pipeline (Topics)'.Next)",
"spanStart": null,
"spanEnd": null
},
"data": {
"context": {
"entityName": "Discover_gallery_next",
"propertyName": "Items",
"id": 3570,
"nodeId": null,
"diagnosticContext": {
"dataOperation": {
"protocol": "cds",
"operation": "getRows",
"dataSource": "Topics",
"apiId": "CdsNative",
"table": "gp_topics",
"operationName": "CdsConnector.getRowsAsync",
"requestDetails": {
"RequestedLookups": 1,
"RequestedColumns": 6
}
},
"formula": "Filter(Topics, 'Topics (Views)'.'Current and future topics - discover', Pipeline = 'Pipeline (Topics)'.Next)"
}
},
"request": {
"url": "https://org0.crm0.dynamics.com/api/data/v9.0/gp_topics?%24filter=%28gp_pipeline+eq+122810001%29&%24expand=gp_Responsible%28%24select%3Daaduserid%2Cuserprincipalname%29&%24select=gp_topicid%2Cgp_pipeline%2Cgp_name%2Cgp_Responsible%2Cgp_inputslides%2C_gp_responsible_value&savedQuery=5766ef74-b709-ee11-8f6e-000d3a2c0eeb&%24count=true",
"method": "GET",
"headers": {
"Accept": "application/json",
"Prefer": "odata.continue-on-error",
"x-ms-user-agent": "PowerApps/3.24013.17 (Web AuthoringTool; AppName=58cd87be-a83d-4733-9321-005c2526cf24)",
"x-ms-client-session-id": "00e9c3f0-ad1f-406d-8c23-a948facc4465",
"x-ms-client-request-id": "30983043-09f7-4442-9329-a4077cf1ee0e",
"Request-Id": "30983043-09f7-4442-9329-a4077cf1ee0e",
"Client-Session-Id": "00e9c3f0-ad1f-406d-8c23-a948facc4465",
"x-ms-app-id": "58cd87be-a83d-4733-9321-005c2526cf24",
"Accept-Language": "en-US",
"Cache-Control": "no-cache, no-store",
"Content-Type": "multipart/mixed;boundary=batch_1da6e0c8-c535-4f23-8d63-1ab5e1b63121"
},
"body": ""
},
"response": {
"duration": 1030.3,
"size": 1033,
"status": 400,
"headers": {
"REQ_ID": "dbab88c0-d4f9-41c7-a080-905b33ae99db",
"Content-Type": "application/json; odata.metadata=minimal",
"OData-Version": 4,
"Cache-Control": "no-cache",
"content-encoding": "br",
"Content-Length": 533,
"expires": -1,
"odata-version": 4,
"req_id": "dbab88c0-d4f9-41c7-a080-905b33ae99db",
"x-ms-client-request-id": "30983043-09f7-4442-9329-a4077cf1ee0e"
},
"body": {
"error": {
"code": "0x80040216",
"message": "An unexpected error occurred.",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey": "Plugin/Microsoft.Crm.ObjectModel.CustomBusinessEntityService",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey": "fda398e3-e5ef-ed11-8848-0022488031ab",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey": 1,
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiActivityIdKey": "615d6b18-2e89-4d66-8cbd-8dcaea657db9",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey": "System",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey": "System",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory": "ClientError",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName": "UnExpected",
"@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode": 400,
"@Microsoft.PowerApps.CDS.HelpLink": "http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040216&client=platform",
"@Microsoft.PowerApps.CDS.InnerError.Message": "An unexpected error occurred."
}
},
"responseType": "text"
}
}
}
So "An unexpected error ocurred"
This indicates to me that it is something else than delegation.
Of course - the million-dollar question is: what do I do now?
Thanks 😊
/Jesper
Hi @ivan_apps
I have now looked through the video that @Jmanriquerios linked to, and I would honestly not have suggested delegation issues myself - not withg 39 rows in my table.
But to answer your question, here is the "Items" property on the bottom, right-most blue gallery (the one with 6 items, displayed in the original post):
The full listing of the property is this:
The "Current and future topics - other" view in Dataverse has a "Pipeline" choice column that I am filtering on.
And about the data:
I have three tables from Dataverse:
Meetings has 10 rows
Topics has 39 rows
The table "Microsoft Entra IDs" has thousands of rows. It is used to look up properties on the Topic table items.
In each item (Topic) of a gallery I look up the "Responsible" property and display parts of the email.
If(IsBlank(ThisItem.Responsible.'User Principal Name'),"","(" & Upper(Left(ThisItem.Responsible.'User Principal Name',5)) & ")")
In the "Topics" table in Dataverse I have a few columns where I look up data in the AAD.
Maybe the lookup of the property values in "Microsoft Entra IDs" can the culprit here, but I would have expected that - even if property data could not be loaded from "Microsoft Entra IDs", it would still display the "Topics" item itself ... but maybe without the additional property value.
I hope that this makes sense 😊
Thanks
Jesper
At first I would agree that you’re hitting delegation issues if you see sporadic data. However you state there is only 35 records in your Dataverse, is it in a single table only? Can you share your ‘items’ property for one of the galleries that is having issues?
I’d check if you are using a View for your galleries and see if you’re perhaps running into a race condition or your filters have cascading dependencies.
You are having delegation problems with the data. Check out this article that talks about it.
https://learn.microsoft.com/es-es/power-apps/maker/canvas-apps/delegation-overview.
There are ways to overcome this problem, but it will possibly involve you adjusting your views, I share this video on how to overcome it https://www.youtube.com/watch?v=2cKcylsGlPg&feature=youtu.be
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
You can accept more than one post as a solution
Follow me on Linkedin, I talk about Power Platform
www.linkedin.com/in/jonathan-manrique-rios