Home » Microsoft » MB-400 » Which options should you use To answer, select the appropriate options in the answer area.
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:
Correct Answer:
Explanation/Reference:
Explanation:
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