cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
_ppaliwal
Regular Visitor

Dynamics 365 - Display error message if Patch failed

Hi All,

I have connected my Dynamics 365 Organization and created a new application from it. Am trying to simply use a Patch function to update a value in CRM.

 

Patch(Opportunities, Gallery2.Selected, { statuscode:100000001, statecode:1})

To show any error messages, I have put up a label with a text property as following

 

First(Errors(Opportunities, Gallery2.Selected)).Message

 

Now, when trying to update the selected gallery record am expecting this to fail saying "statecode is read-only" and it indeed does fail (coz going back into edit mode powerapps shows me the error on the button which had Patch method and it contains the entire text which was received from CRM server

 

BUT

 

The text box which should show the error is still empty. Can you hep me figure out how to display this error message to user.

3 REPLIES 3
v-micsh-msft
Community Support
Community Support

Hi @_ppaliwal,

 

I just tested the formula you specified and it works in my scenario.

Have you configured any other property of the Label, such as the Visible property?

 

14.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Michael for trying however I would like to mention that these formula's would certainly work for a normal data source but in this case I'm using a dynamics 365 connector for which you should have a Dynamics 365 instance to work with.

I have exactly the same problem, connecting to Dynamics NAV. Did you ever find a solution?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,691)