PL-400 · Question #364
Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might…
The correct answer is A. Yes. Throwing an InvalidPluginExecutionException in a synchronous plug-in is the correct method to display a custom error message directly to the user on the form when validation fails.
Question
Options
- AYes
- BNo
How the community answered
(47 responses)- A85% (40)
- B15% (7)
Why each option
Throwing an InvalidPluginExecutionException in a synchronous plug-in is the correct method to display a custom error message directly to the user on the form when validation fails.
When a synchronous plug-in throws an InvalidPluginExecutionException, the transaction is stopped, and the message provided in the exception is displayed directly to the user on the form, meeting the requirement for showing an error message.
Concept tested: Plug-in error handling and user feedback
Source: https://learn.microsoft.com/en-us/power-apps/developer/data-platform/write-plug-in#throw-an-invalidpluginexecutionexception
Community Discussion
No community discussion yet for this question.