Microsoft Power Platform Developer PL-400 Exam: Publish Event with Dataverse Plug-in Registration Tool

Publish Event with Dataverse Plug-in Registration Tool

Question

You create a model-driven app and a Dataverse plug-in.

The plug-in monitors a company's address change in the Accounts table.

If the change happens, the plug-in emails the sales manager without affecting the app's users.

Please select the two steps you need to take to publish an event using the Dataverse Plug-in Registration Tool.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F. G.

Correct Answers: B and F

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.

To register the plug-in for the event, you need to register the plug-ins assembly and then attach the plug-in to the Dataverse event.

After you establish a connection to the Dataverse environment in the Dataverse Plug-in Registration Tool, you open the Register New Assembly screen (Number 1)

On this screen, you browse for the plug-in assembly (Number 2).You need to be sure that the Sandbox isolation mode (Number 3) and the Database (Number 4) are selected.

The rest of the options in Steps 3 and 4 are for the on-premises Dynamics 365 deployments.

Then you push the “Register Selected Plugins” button (Number 5).

Register New Assembly @ @®

Step 1: Specify the location of the assembly to analyze
C:\Users\ gt ee Dev\Power Platform\Power Apps\PowerApp:
Load Assem

Step 2: Select the plugin and workflow activities to register
\V) Select All / Deselect All

4 [| @ (Assembly) FollowupPlugin
v) Tm} (Plugin) PowerApps.Samples.FollowupPlugin - Isolatable

Step 3: Specify the isolation mode

| 3 |

None

Step 4: Specify the location where the assembly should be stored

Too IQ

Disk @

GAC @

Step 5: Log

Close

Register Selected Plugins

After successfully registering the assembly and plug-in, you need to attach the plug-in to the Dataverse event using the Register New Step screen (Number 1)

On the screen, you provide a message (event name)

In our case, it is an Update event (Number 2) for the account table (Number 3)

You need to register the plug-in execution on the PostOperation stage (Number 4) in Asynchronous mode (Number 5) because you do not want the app to wait until the plug-in sends an email and possibly impacts the other users' operations.

And finally, you can push the Register New Step button (Number 6).

Register New Step @

General Configuration Information

Message Update 6

Primary Entity account ©

Secondary Entity

Filtering Attributes All Attributes

Event Handler (Plugin) PowerApps.Samples.FollowupPlugin - Isolatable

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 @ v @ Asynchronous |v) Server

(@) senor {_] Offline

Delete AsyncOperation if StatusCode = Successful

v

Unsecure Configuration

Secure Configuration

Register New Step

Close

a

Options A and H are incorrect because you can use the Organization service (plug-in) only on the PostOperation and not on the PreOperation event pipeline stage of execution.

Options C is incorrect because you need to execute the plug-in in Asynchronous, not in Synchronous mode.

Options D, E, and Gare incorrect because these options are for assembly registration for the on-premises Dynamics 365 deployments.

For more information about event registration using the Dataverse Plug-in Registration Tool, please visit the below URLs:

To publish an event using the Dataverse Plug-in Registration Tool, you need to follow the steps below:

  1. Register a New Assembly: The first step is to register a new assembly in the Dataverse environment. This assembly contains the code for your plug-in. You need to choose an appropriate isolation mode for your assembly. You can select either Sandbox isolation mode or None isolation mode.

Sandbox isolation mode provides a secure environment for the plug-in to execute in. It prevents the plug-in from accessing resources outside of its isolated environment. This is a recommended option for plug-ins that execute code in the Dataverse environment.

None isolation mode allows the plug-in to execute outside of a secure sandbox environment. This is suitable for plug-ins that require elevated privileges or require access to external resources.

You also need to choose a storage location for your assembly. You can store the assembly either in the database or the Global Assembly Cache (GAC).

  1. Register a New Step: After registering the assembly, you need to register a new step that specifies the event you want to monitor in the Dataverse environment. In this case, you want to monitor the Account entity's Update event.

You need to choose the appropriate execution mode for your step. There are two execution modes: Synchronous and Asynchronous.

Synchronous execution mode allows the plug-in to execute before or after the event has completed. This mode blocks the event until the plug-in completes execution. This mode is useful when you need to validate or modify the data before it's saved.

Asynchronous execution mode allows the plug-in to execute after the event has completed. This mode does not block the event and is useful when you need to perform long-running tasks or tasks that do not require user interaction.

You also need to specify the stage of the event where you want the plug-in to execute. The PreOperation stage executes the plug-in before the event, while the PostOperation stage executes the plug-in after the event.

In this case, you want to monitor the Account entity's Update event, so you need to register a new step on the account entity for either Synchronous execution on the PostOperation stage or Asynchronous execution on the PreOperation stage.

Once you have registered the assembly and step, you can test your plug-in to ensure that it's working correctly. If everything is working as expected, you can publish the plug-in to the Dataverse environment.

In summary, to publish an event using the Dataverse Plug-in Registration Tool, you need to register a new assembly, specify the appropriate isolation mode and storage location, and register a new step that specifies the event you want to monitor, the execution mode, and the stage of the event where you want the plug-in to execute.