exam questions

Exam MB-400 All Questions

View all questions & answers for the MB-400 exam

Exam MB-400 topic 5 question 6 discussion

Actual exam question from Microsoft's MB-400
Question #: 6
Topic #: 5
[All MB-400 Questions]

HOTSPOT -
A manufacturing company takes online orders.
The company requires validation of order changes. Requirements are as follows:
✑ If validation is successful, the order is submitted.
If exceptions are encountered, a message must be shown to the customer.

You need to set up and deploy a plug-in that encapsulates the rules.
Which options should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: PreValidation -

PreValidation -

Pre-event/Pre-Validation -
This stage executes before anything else, even before basic validation if the triggering action is even allowed based on security. Therefore, it would be possible to trigger the plug-in code even without actually having permission to do so and great consideration must be used when writing a pre-validation plug-in. Also, execution in this stage might not be part of the database transaction.
Examples:- security checks being performed to verify the calling or logged on user has the correct permissions to perform the intended operation.
Note: Ideally, you should only cancel operations using synchronous plug-ins registered in the PreValidation stage. This stage usually occurs outside the main database transaction. Cancelling an operation before it reaches the transaction is highly desirable because the cancelled operation has to be rolled back.

Box 2: Synchronous -
When you throw an InvalidPluginExecutionException exception within a synchronous plug-in an error dialog with your message will be displayed to the user.

Box 3: Pre Image -

Box 4: Throw new InvalidPluginExecutionException("Your error message", ex);
When you throw an InvalidPluginExecutionException exception within a synchronous plug-in an error dialog with your message will be displayed to the user.
Reference:
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/handle-exceptions https://community.dynamics.com/crm/b/thinkdynamicdodynamic/posts/pre-image-and-post-image-in-dynamics-crm

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
paulcab
Highly Voted 5 years ago
Execution stage should definitely be pre-validation https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/event-framework PreValidation For the initial operation, this stage will occur before the main system operation. This provides an opportunity to include logic to cancel the operation before the database transaction. Subsequent operations triggered by extensions registered in other stages will pass through this stage as well but will be included within the transaction of the calling extensions. This stage occurs before any security checks are preformed to verify that the calling or logged-on user has the correct permission to perform the intended operation.
upvoted 19 times
...
sanharshu7
Most Recent 5 years ago
Execution Stage should be PreOperation
upvoted 2 times
zoom_83
4 years, 11 months ago
First you should do the Validation (if required) then if it's fine you do the PreOperation. So Answer is correct in my opinion.
upvoted 2 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 ...