Dear All,
The following basic pattern works successfully for catching errors when using the Patch function for updating items in a Sharepoint List (formula-level error management is enabled under settings)
(1) I created a button and use the following code under the OnSelect action to capture the error to a collection named 'colErrorSPL' for a Patch with a known error (the field 'MandatoryFill' should have a value in the patched record, but it is not in there):
Patch(TestList, {Title:"x"});
ClearCollect(colErrorSPL, Errors(TestList))
(2) The button displays the error when I click 'Get help for this error'
(3) This error is indeed visible when browsing File>Collections:
Now when I try the same pattern for a Dynamics 365 for Finance and Operations data connection
(1) I created a button and use the following code under the OnSelect action to capture the error to a collection named 'colErrorBOL' for a Patch with a known error (the value in field 'carrierName' should be in a validated list, while the value in the patch record is not in that list):
Patch(BillOfLadings, {dataAreaId: "msfh", BillOfLading: "21-006ET-AF-DG-DD-MSFS", carrierName: "SKOF"});
ClearCollect(colErrorBOL, First(Errors(BillOfLadings)))
(2) The button displays the error when I click 'Get help for this error'
(3) The error is not visible when I browse the Collections:
So my basic questions are:
(A) Is there any type of workaround for fetching the error which is coming back to PowerApps? It is, after all, visible when clicking 'get help on this error'.
(B) If not, is this a known issue specifically for the Errors() function in relation to Dynamics 365? Can I track progress with Microsoft for solving the issue somewhere?
(C) If not, how do I best raise the issue to Microsoft?
My current workaround would be to trigger a PowerAutomate Flow instead, as this does allow for error processing; as part of the flow, any errors can then be fed back to users via e-mail, or (more comprehensive solution) back into the PowerApp using a write of the errors to a Sharepoint List / CDS table and a periodic refresh into a data table. But it would just be so much more simple and robust to be able to fetch the errors after a Patch.
Thanks for any help you can give.
Johan

Report
All responses (
Answers (