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 / Canvas app does not ca...
Power Apps
Answered

Canvas app does not catch plug-in exception on SubmitForm

(0) ShareShare
ReportReport
Posted on by 101

Hi, 
I wonder if anyone could help me with the following:

When I use SubmitForm I don´t get any error message about plug-in exception but when using Patch I do.

My context:

I have an embedded canvas app on Dynamics 365 form (Opportunity entity); all working above Dataverse.
The app consists of several Edit Forms with fields and a submit button.
The app settings has Formula-level Error Mangement = ON.

My scenario:
On data submit the app fills in fields in the Opprotunity entity, at the same time a plug-in launches and compares all relevant Opportunity form data (not only the app fields) against a reservation system (outside of Dynamics). If there is some discrepancy the plug-in returns an exception but my app "swallows" it when using SubmitForm function. 

When I tried using Patch instead of SubmitForm I got the system message telling me about data discrepancy when communication with the reservation system (see the pic).

Unfortunately Patch functions are a bit tedious to write and it makes fileds validations more tedious...
So my question is:
What is the reason for this kind of behaviour?
Can I make SubmitForm works the same way as Patch?

Thanks a lot
Hancha

System Error Message with Patch.png
Categories:
I have the same question (0)
  • Verified answer
    Hancha Profile Picture
    101 on at

    My question still stands but I´ve come up with a working workaround, combining Patch and Submit so I can use all the advantages of both 😉

    I´m checking the Valid property of the form and If valid I go for Patch, if not I´ll run SubmitForm, which highlights all the incorrectly filled fields...

    Something like this:
    If(
    MyForm.Valid
    ),
    Patch(
    Opportunities,
    LookUp(
    Opportunities,
    OpportunityID = [@ModelDrivenFormIntegration].Item.OpportunityID),
    {
    'Column1Name': DataCardValueXY.Selected.Value,
    'Column2Name': DataCardValueYZ.Text,
    etc...
    }
    );
    Navigate(SuccessScreen),
    SubmitForm(MyForm)
    );


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
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard