Writing a sample plugin

Let's say we want to write a plugin for the logic that we previously implemented using JavaScript, where we auto-populated the Email field in an account entity record from a selected contact. Let's use the following steps to write our plugin:

  1. Navigate to Visual Studio | New and select Class Library (.NET Framework).
While creating the solution, keep in mind that we can use .NET Framework version 4.6.2 or later for Dynamics 365 CE.
  1. Once the project has been created, we can rename the class based on our requirements; for example, we have renamed it SetEmailFrmContactOnAccountPreCreate.
  2. Let's add Dynamics 365 CE assemblies to our project. Right-click on our project and select the Manage NuGet Packages option.
  3. Add some ...

Get Implementing Microsoft Dynamics 365 Customer Engagement now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.