Posts

Showing posts with the label C#

Implementing and Registering Dataverse Plugins: Create Message End-to-End Guide

Implementing and Registering Dataverse Plugins: Create Message End-to-End Guide Server-side logic in Dataverse runs when specific events occur. Plugins let you inject custom behavior during these events. This section covers how to compile plugin code, register it, connect it to a trigger, and validate its execution. Compile the Plugin Assembly Your plugin must be compiled into a DLL before Dataverse can run it. In Visual Studio, use Rebuild on your project. After a successful build, open the project’s output folder and locate the DLL inside bin\Debug . // Example: Locate compiled plugin DLL ProjectFolder\bin\Debug\YourPluginAssembly.dll Connect to Dataverse Environment Use the Plugin Registration Tool inside XrmToolBox. Launch the Connection Wizard, enter your organization URL, and authenticate. Set a highlight color for the environment to avoid deploying to the wrong system. Register the new assembly by selecting ...

Plugin Project Structure and Coding Foundation

Plugin Project Structure and Coding Foundation With the development environment and tools ready, the next step is to organize your project files so you can begin writing plugin logic that Dynamics CRM will accept and run. Project Creation and Naming In Visual Studio, create a new project using the Class Library (.NET Framework) template. Use a clear naming pattern such as CompanyName.Plugins.EntityName. For example, a plugin for the Account table could be named LS.Plugins.AccountPlugins. Make sure the project targets .NET Framework 4.6.2, as this is required for compatibility with Dynamics CRM. Signing the Assembly Before a plugin can be registered in CRM, its assembly must be signed with a strong name key. In Visual Studio, open the project properties and go to the Signing tab. Check Sign the assembly, then create a new key file such as key.snk. For simplicity during development, you can choose to ...