Creating your first plugin
Plugins are some of the most powerful extensions Dynamics 365 offers. They allow you to execute a process before or after an entity's event, such as create, update, assign, and so forth.
In the previous recipe, we created a data access layer class that retrieves e-mails and updates entities. In this recipe, we will leverage this layer and convert the class into a plugin that retrieves e-mails associated with a specific account, closes the ones with no subject, and updates the start date of the rest to ten days from today's date.
Getting ready
For this recipe, you will need the Visual Studio solution created in this chapter's Creating a Visual Studio Solution for Dynamics 365 customization, the early bound entities with the optionset enum values created in the Creating early bound entity classes and Extending CrmSvcUtil to generate optionsets enum recipes of Chapter 3, SDK Enterprise Capabilities, and the data access layer defined in Creating a LINQ data access layer...