Create a Dataverse Plug-in for Monitoring and Emailing Sales Manager | PL-400 Exam | Microsoft Power Platform Developer

Event Stage for Registration of Step for Accounts Update and Additional Registration

Question

You create a new Dataverse plug-in.

The plug-in monitors a company name change in the Accounts table.

If the change happens, the plug-in emails the sales manager.

The email text includes the alert about the change and provides the old and new company names.

Please select the event stage for the registration of the new step for the Accounts update and additional registration attached to this step?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answers: B, D and E

The Dataverse plug-in is a .Net assembly that can modify the platform behavior.

You can create your .Net project using a development environment, like Visual Studio or Visual Studio Code.

After compiling the project and creating an assembly, you need to register the assembly and map the classes to the Event Framework events as logic business steps.

There are three stages in plug-in event pipeline execution: PreValidation - an initial stage before the main operation.

You can include the logic for canceling the event before the data transaction.

PreOperation - the next stage before the main operation but within the data transaction.

You can make changes to the data in operation.

PostOperation - the stage after the main operation and still within the data transaction.

You can call other actions using the Organization service before the message returns to the caller.

You create a plug-in that compares the company name before and after the table update.

To accomplish this task, you need to use the table snapshots before and after the transaction.

The Dataverse Plug-in Registration Tool provides an option to create a snapshot before (Pre image) and after (Post image)

Following a plug-in registration, you register a new step (Number 1) for the Account table update (Number 2) and select PostOperation event stage (Number 3).

Register New Step @

General Configuration Information

Message Update ©
Primary Entity account

Secondary Entity

Filtering Attributes All Attributes

Event Handler (Plugin) PowerApps.Samples.FollowupPlugin - lsolatable
Step Name PowerApps.Samples.FollowupPlugin: Update of account
Run in User's Context Calling User

Execution Order 1

Description PowerApps.Samples.FollowupPlugin: Update of account

Event Pipeline Stage of Execution Execution Mode Deployment

PostOperation i © Asynchronous [¥] Server

© @ Synchronous [| Offline

|_| Delete AsyncOperation if StatusCode = Successful

v

Unsecure Configuration

Secure Configuration

Register New Step

Close

Within this stage, you can call your plug-in and evaluate the images.

But before that, you need to register the images for this step.

On the Register New Image screen (Number 1), you select the step (Number 2) and check both Pre Image and Post Image boxes (Number 3)

You provide the image name, the table alias, and select the table column as a parameter (Number 4) if needed.

After you push the Register Image button, the tool would attach the image to the step.

Register New Image @

Select a Step

> & (Assembly) Adxstudio.Xrm.Plugins ~
> @ (Assembly) Adxstudio.Xrm.Plugins.WebNotification

> & (Assembly) Adxstudio.Xrm.Plugins, WebNotificationUrl

> @& (Assembly) Adxstudio.Xrm.Workflow.AssignWebRole

> @ (Assembly) Adxstudio.Xrm.Workflow.AzureStorage

> & (Assembly) Adxstudio.Xrm.Workflow.ldentity

> @ (Assembly) Adxstudio.Xrm.Workflow.Invitation

& (Assembly) Adxstudio.Xrm.Workflow.UnassignWebRole

& (Assembly) Adxstudio.Xrm. Workflow. WebNotifications

4 @ (Assembly) FollowupPlugin

»
»

4 i (Plugin) PowerApps.Samples.FollowupPlugin - Isolatable
[B) (Step) PowerApps.Samples.FollowupPlugin: Update of account @
> @ (Assembly) Microsoft,CDS.AdvancedAnalyticsinfra.Plugins
> @& (Assembly) Microsoft.CDS.ApplicationUser.Plugins
>» @& (Assembly) Microsoft,CDS.Cataloc.Pluains ~.

Image Type

| Pre Image v) Post Image 3]

Name Image

Entity Alias Image

Parameters

Register Image Cancel

When you change the company name, the plug-in compares the account names before using the Pre image and after the update using the Post image and sends an email if there are any differences.

All other options are incorrect.

For more information about Pre and Post image use, please visit the below URLs:

In this scenario, you are creating a Dataverse plug-in that needs to monitor changes in the Accounts table and send an email to the sales manager. To accomplish this task, you need to register a new step for the Accounts table update event, and you need to select the appropriate stage for this registration.

The event stages available for registration are PreValidation, PreOperation, PostOperation, PreImage, and PostImage. Here's a detailed explanation of each stage and how they could be used:

A. PreValidation: This stage occurs before any validation of the data occurs. At this stage, you can modify the input parameters to the event. This stage is useful if you need to modify the data before it is validated.

B. PostImage: This stage occurs after the database transaction is committed. At this stage, you can access the data that was changed during the event. This stage is useful if you need to perform actions based on the updated data.

C. PreOperation: This stage occurs before the database transaction is committed. At this stage, you can modify the data before it is saved to the database. This stage is useful if you need to modify the data before it is saved.

D. PostOperation: This stage occurs after the database transaction is committed. At this stage, you cannot modify the data that was changed during the event. This stage is useful if you need to perform actions based on the updated data.

E. PreImage: This stage occurs before the database transaction is committed. At this stage, you can access the data that will be changed during the event. This stage is useful if you need to perform actions based on the data before it is saved.

Based on the scenario given, the appropriate stage for the registration of the new step would be "PostImage" because you need to access the updated data in the Accounts table and send an email to the sales manager with the old and new company names. You would also need to attach an additional registration to the step to specify which attributes you want to retrieve in the post image.