Skip to main content

Posts

Showing posts from 2018

MSCRM Plugin Vs Workflow

In Dynamics CRM, workflows and plugins are used to automate business processes.They allow businesses to hook onto events that occur in the system. Here we will look at the differences between the two and when to use which one. Looking in Dynamics CRM in our default solution, we see Processes and Plug-in Assemblies. Processes are where our workflows are located, along with actions and business process flows. You can see there are several processes below: Let’s take a look at one of these – Auto Response Email for Case: As can be seen, this workflow will run on the Case entity when a record status is changed, and it will run in the background. The logic says: If the case status is resolved, send a new email message and stop the workflow Otherwise, stop the workflow Opening the first step, we can see we have an email template, where we can add the from and to as dynamic values from the case itself. The message of the email allo...

MSCRM Plugin Development Steps

This section will cover the following: How to start developing a plug-in Example 1: Update parent record based on multiple fields Example 2: Update same record based on multiple fields How to Start Developing a Plug-in 1. Download CRM SDK. This will provide you all the information, required SDK assemblies, and many helpful samples. 2. Set up your plug-in project in Visual Studio. This will be a .NET class library. 3. Add References. At a minimum, you will need Microsoft.Xrm.Sdk, obtained from CRM SDK. 4. Extend the class from Microsoft.Xrm.Sdk.IPlugin 5. Write your code 6. At the project, sign the assembly. This is required in order to be able to deploy the plugin. 7. Compile the assembly and deploy using Plugin Registration Tool. Example 1: Update parent record based on multiple fields Here’s an extremely simplified example of a plug-in. We have parent record with a field for total and a single child with unit and rate. When either unit or rate changes...