web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Errors() function not ...
Power Apps
Unanswered

Errors() function not working for Dynamics 365 for Finance and Operations while same pattern works for Sharepoint List

(0) ShareShare
ReportReport
Posted on by

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'

msf_procoff_0-1624519629020.png

(3) This error is indeed visible when browsing File>Collections:

msf_procoff_1-1624519894383.png

 

 

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'

msf_procoff_2-1624520050674.png

(3) The error is not visible when I browse the Collections:

msf_procoff_3-1624520091241.png

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

Categories:
  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @msf_procoff 

    not a solution, but your Patch formula has 2 parameters while it requires 3. 

     

    Example:

    Patch(BillOfLadings, Defaults(BillOfLadings), {dataAreaId: "msfh", BillOfLading: "21-006ET-AF-DG-DD-MSFS", carrierName: "SKOF"});
    ClearCollect(colErrorBOL, First(Errors(BillOfLadings)) )

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard