Exam PL-400 All QuestionsBrowse all questions from this exam
Question 227

DRAG DROP -

You are developing a Power Platform app for a school. The school plans to use the app to gather information about classes and students.

You must design a plug-in for the app. You must store data about students in the Contacts table and store data about classes in a custom table.

You need to select the stage in the event pipeline for each function.

Which stages should you use? To answer, drag the appropriate plug-in stages to the correct functions. Each plug-in stage may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.

Select and Place:

    Correct Answer:

    Box 1: 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.

    Box 2: PreOperation -

    Occurs before the main system operation and within the database transaction.

    If you want to change any values for an entity included in the message, you should do it here.

    Avoid cancelling an operation here. Canceling will trigger a rollback of the transaction and have significant performance impact.

    Box 3: PostOperation -

    Occurs after the main system operation and within the database transaction.

    Use this stage to modify any properties of the message before it is returned to the caller.

    Reference:

    https://docs.microsoft.com/en-us/powerapps/developer/data-platform/event-framework

Discussion
sumiiiiiiiii

Correct answer

MikeAWS

1. PreValidation - In our case, we want to cancel a class if the student is over 15 years old. This involves validating the student's age before allowing the class operation to proceed. The PreValidation stage is the most appropriate because it lets you check the student's age and conditionally cancel the class operation before validation occurs. 2. PreOperation - in this case, the requirement is to update the record and potentially roll back changes if an error occurs. The PreOperation stage is the appropriate choice because you can update the record and throw an exception to roll back changes if needed. 3. PreOperation - since we need to determine the appropriate class for the student before the main operation of adding the student is executed, the PreOperation stage is the appropriate choice for this scenario.

MikeAWS

1. PreValidation 2. PreOperation 3. PreOperation

jkaur

-PreValidation -PreOperation -PostOperation

HiJaak

Last one cannot be PostOperation as https://learn.microsoft.com/en-us/power-apps/developer/data-platform/event-framework states: "Occurs after the main system operation and within the database transaction. Use this stage to modify any properties of the message before it is returned to the caller. Avoid applying changes to an entity included in the message because this will trigger a new Update event." So it should be: 1. PreValidation 2. PreOperation 3. PreOperation

SuperRaj

PreValidation PostOperation PostOperation

SvetlankaP99

PreValidation PreValidation (not PreOperation because - avoid cancelling operation in PreOperation) PreOperation

hai297

PreValidation PreOp PreOp You must store data about students in the Contacts table and store data about classes in a custom table => should change in PreOpt and in the transaction

SvetlankaP99

Second can't be PreOperation, it's PreValidation, because of Rollback

At09

useless question.. but go with what you guys say