I have an entity that I am using in PowerApps and it has a field "Checked" with two values: "Yes" and "No". By default all of them are selected as "No", but if it becomes a "Yes" - then it disappears from the entity. It is no longer is there, so basically it gets deleted.
The thing is, when I submit form with "Checked" field set to "Yes", it makes the changes to the item that is being edited in the form, submits them but shows an error:
The specified record was not found. Server response: NotFound
So for some reason PowerApps tries to lookup this field again and finds out it is not there (therefore shows the error). However everything works for me as intended but PowerApps decides to show the error, which is a problem.
Do you guys think it is possible to surpress the error or make a workaround for this? Or am I forced in this situation to edit the entity not to delete the record if its' "Checked" field is set to "Yes"?
It looks like you are using CDS. Please correct me if that is not the case. If so, what is the Data Type of the Checked column? What are the OnCheck OnSelect and OnUncheck properties of the Checkbox control?
Correct, I am using CDS, specifically - Dynamics 365 for Finance & Operations. Let me explain how my form works, here's a visual representation:
I have an entity with lists of deliveries that have come to my place and that need to be checked for quality. Once they are checked - they disappear from the entity as they are no longer needed. The purpose of the application is to check all the received deliviries, which opens up the form above. User has options to change the visual quality of the delivered product and mark if it needs to be scrapped. Once button "Save" is pressed (dark blue box on the right, where the error is), it is marked as "Checked" - Yes. Checked is an enum data type which is hidden in this form because it is being changed without user knowing.
Here is the formula for my "Save" button OnSelect property:
CheckedVar is being used for "Checked" field hidden dropdown, once saved it is being marked from "No" -> "Yes". Checked dropdown Default property:
By default Checked dropdown is set to "No" when the edit screen is being opened. EditForm screen OnVisible property:
Whenever the item from entity is saved in this form, it disappears from entity. Everything works very well and as intended, but it shows to me the error that the record no longer can be found (after changes are saved and patched) - which is totally fine, because the edited record is supposed to disappear from data source once saved.
I've thought about making records not get deleted if their "Checked" field is set to "Yes", but then I will eventually build up an entity with a lot of records that will take time to filter out the ones that are checked.
tl;dr My form upon making changes to a record makes it disappear from entity as intended, but for some reason PowerApps tries to lookup it again (after submitting form) in the entity - therefore shows the error. Can't find a way to surpress it or work around it.
I am a little confused with what I could do with the error. I hope you could guide me to a conclusion. Thanks!
Were you ever able to resolve this issue? I get this error when I delete a record then try to re-create it. Like you it doesn't cause the form to not submit successfully, it just throws this error.
Learn how to create your own user groups today!
Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!
Check out the new Power Platform Community Connections gallery!