Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 7 question 30 discussion

Actual exam question from Microsoft's PL-400
Question #: 30
Topic #: 7
[All PL-400 Questions]

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 have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

A company requires custom validation when users save form records that use a synchronous plug-in.

If validation fails, a message that explains how to resolve the issue must be displayed on the form to the user.

You need to implement the custom validation.

Solution: Throw a custom exception with the message.

Does the solution meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
KucaStonojka
4 days, 18 hours ago
Selected Answer: A
Throwing a custom exception with a message is an effective way to perform custom validation in a synchronous plug-in for Dynamics 365. This approach allows you to interrupt the save operation and display a clear and user-friendly message on the form. When the validation fails, the plug-in can throw an InvalidPluginExecutionException or a custom exception, passing the validation error message. Example: throw new InvalidPluginExecutionException("Validation failed: Please provide the required information."); This exception halts the operation and displays the message to the user directly on the form, allowing them to correct the issue before proceeding.
upvoted 1 times
...
FCTopics
6 months, 1 week ago
Original answer is correct Solution: Throw an InvalidPluginExecutionException with the message. To show a custom message you should use InvalidPluginExecutionException no a Custom Exception
upvoted 1 times
...
NNNT
11 months, 4 weeks ago
The Correct Answer Should be A. Yes To achieve the goal of displaying a user-friendly message on the form when validation fails, you should consider using the OrganizationServiceContext.ThrowInvalidPluginException method with a custom error message.
upvoted 3 times
PY12396
9 months, 3 weeks ago
I think the original answer is correct, because we need a custom message not a custom exception
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...