The Plug-in Registration Tool is a crucial element for Microsoft Power Platform developers, especially when preparing for the PL-400 examination. It allows you to register custom assemblies, one of the critical tasks you will likely encounter in both your practices and your exams. This article will focus on how to register custom assemblies by using the Plug-in Registration Tool.
What is the Plug-in Registration Tool?
Before we delve into the steps for registering custom assemblies, it is crucial to understand the Plug-in Registration Tool itself. This tool is a part of the Microsoft Power Platform, specific to Dynamics 365. Developers use it to register plug-ins or custom workflow activities, which could involve linking them to specific events within the system or connecting them to external services for an outgoing event. The tool is indispensable for customizing and extending the functionalities of the Dynamics 365 platform.
Registering Custom Assemblies
Here is a step-by-step guide on how to register custom assemblies using the Plug-in Registration Tool.
- Download the Plug-in Registration Tool: The tool is part of the Dynamics 365 Software Development Kit (SDK). Before you can register any custom assemblies, you need to download the SDK and extract it.
- Launch the Tool: Navigate to the folder where you extracted the SDK, find and run the tool.
- Connect to the server: Provide your server connection details, such as server URL, organization, username, and password.
- Start the registration process: Once you’re logged in, select ‘Register New Assembly’ from the toolbar.
- Register your assembly: In the dialog box that appears, you’ll point to the.dll file of your custom assembly and select the isolation mode and storage location. The isolation mode could either be ‘sandbox’ (for running with partial trust) or ‘none’ (fully trusted, but only available while on-premises). The storage location could either be ‘database’ or ‘file system’, with the former being the common choice.
- Choose your events: After adding your assembly, you can now register a new step, which is an event that fires your written code. For example, you can choose to fire the code on the creation of a new contact record.
Here’s how you register a ‘create’ step on a ‘contact’ entity for your custom assembly:
IPluginExecutionContext context = (IPluginExecutionContext)
serviceProvider.GetService(typeof(IPluginExecutionContext));
Entity entity;
// Check if the InputParameters property contains a target
// of the current operation.
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)
{
entity = (Entity)context.InputParameters["Target"];
// Verify that the entity represents a contact.
// If not, this plug-in was not registered correctly.
if (entity.LogicalName != "contact")
return;
}
- Save and test: After defining all necessary steps, and saving them, you should now test to confirm that your setup is working as expected.
In conclusion, the PL-400 exam requires the candidate to understand how to use the Plug-in Registration tool effectively, particularly for registering custom assemblies. Familiarize yourself with its functions and application, as outlined in this guide, to increase your chances of succeeding in the exam.
Practice Test
True or False: The Plug-in Registration Tool is a part of the Power Platform Developer’s SDK.
- Answer: True
Explanation: The SDK (Software Development Kit) for Power Platform Developers includes the Plug-in Registration Tool which helps in registering and managing custom assemblies.
Which of the following is utilized to register a Plug-in on the Power Platform?
- A. Power BI
- B. Plug-in Registration Tool
- C. Flow Builder
- D. Canvas Studio
Answer: B. Plug-in Registration Tool
Explanation: The Plug-in Registration Tool is a specific tool provided by Microsoft within the Power Platform Developer’s SDK to register plug-ins.
True or False: It is not possible to register custom workflow activities using the Plug-in Registration Tool.
- Answer: False
Explanation: Custom workflow activities can indeed be registered using the Plug-in Registration Tool in addition to Plug-ins.
What does the Plug-in Registration Tool require for registering plug-ins?
- A. Microsoft account
- B. Power Platform tenant
- C. On-premises deployment
- D. All of the above
Answer: D. All of the above
Explanation: The tool requires a Microsoft account with the appropriate access rights to register plug-ins. It can register plug-ins on a Power Platform tenant or an on-premises deployment.
True or False: You can register assembly files with the *.dll extension using the Plug-in Registration Tool.
- Answer: True
Explanation: The Plug-in Registration Tool can be used to register assembly files with the *.dll extension.
Which of the following needs to be set up first before registering a plug-in with the registration tool?
- A. A SQL Server
- B. A Power Platform
- C. An Active Directory
- D. A .NET framework
Answer: B. A Power Platform
Explanation: You first need to set up a Power Platform before you can register a plug-in with it using the registration tool.
True or False: The Plug-in Registration Tool allows you to update existing plug-ins with new versions.
- Answer: True
Explanation: The Plug-in Registration Tool isn’t limited to just registering new plug-ins; it also lets you manage existing plug-ins, including updating them to newer versions.
Which programming language should be used to create a plug-in before registering it using the Plug-in Registration Tool?
- A. Java
- B. Python
- C. JavaScript
- D. C#
Answer: D. C#
Explanation: Microsoft uses C# as the programming language for creating plug-ins before they can be registered with the Plug-in Registration Tool.
True or False: Every registered plug-in will automatically be available to all PowerApps in a tenant.
- Answer: False
Explanation: Not all registered plug-ins will be automatically available to all PowerApps in a tenant. They need to be configured at the app level.
Which type of message processing step should you not select when registering a plug-in?
- A. Create
- B. Update
- C. Delete
- D. Assemble
Answer: D. Assemble
Explanation: Assemble is not a type of message processing step that one can select when registering a plug-in. These steps typically include Create, Update, and Delete actions.
Interview Questions
What is the basic function of the plug-in registration tool in Microsoft Power Platform?
The plug-in registration tool is used to register plug-ins, custom workflow activities, and service endpoints with the Microsoft Power Platform.
Where can you find the Plug-in Registration Tool in Microsoft Power Platform?
The plug-in registration tool is a part of the Power Platform SDK and can be downloaded from NuGet.
What are the steps to use the Plug-in Registration Tool to register a custom Assembly?
The steps involve: opening the plug-in registration tool, creating a new connection, selecting the assembly and registering it.
Can the plug-in registration tool be used to update an already registered plug-in?
Yes, an existing plug-in can be updated using the plug-in registration tool.
Is it possible to unregister a plugin using the Plug-in Registration tool?
Yes, it is possible to unregister a plugin using the Plug-in Registration tool.
Which programming languages can be used to write the code for custom assemblies that can then be registered using the Plug-in Registration Tool?
Custom assemblies can be written using any .NET Framework language, such as C#, VB.NET, or F#.
How can you specify the execution order of plugins registered with the plugin registration tool?
The execution order of plugins can be specified by setting their execution order (rank) during the registration process.
What happens if two or more plugins registered with the plugin registration tool have the same execution order?
If two or more plugins have the same execution order, the system decides their execution order.
What kind of custom assemblies can be registered using the Plugin Registration Tool?
The Plugin Registration Tool can register custom assemblies that implement IPlugin or CodeActivity.
Can the Plugin Registration Tool manage the Isolation Mode of plugins?
Yes, the Plugin Registration Tool provides the option to specify the Isolation Mode during the plugin registration process.
What are the two isolation modes available when registering a plugin?
The two isolation modes are None and Sandbox.
Is it possible to register an image using the Plugin Registration Tool?
Yes, Plugin Registration Tool provides the ability to register both pre-images and post-images.
What are pre-images and post-images in the context of Microsoft Power Platform?
Pre-images and post-images are snapshots of the entity’s attribute values before and after the core operation, respectively.
What kind of service endpoint can be registered using the Plugin Registration Tool?
The Plugin Registration Tool can register three types of service endpoints – Web Hook, Azure Service Bus, and REST.
What is the role of the Impersonation option in the Plugin Registration Tool?
The Impersonation option allows the plugin to execute under the context of the user who performed the operation that caused the plugin to execute.