Showing posts from August, 2016

How to create Email activity with dynamically retreived data from Dynamics CRM through Plugin C#

In this blog, I am going to show how we can add dynamically retreived data from CRM in a table and show this data inside a table within the Email body. Apart from adding dynamic data in a table into Email body I have also added code for showing Image which we have saved in web resources inside CRM. In short this blog covers below point: Adding Image from Web Resources Creating HTML formatted table from DataTable Converting EntityCollection into DataTable Showing dynamic data in Email body description  1. First of all below required namespaces in your code(Add required references)  using Microsoft.Crm.Sdk.Messages;  using Microsoft.Xrm.Sdk;  using Microsoft.Xrm.Sdk.Query;  using System;  using System.Collections.Generic;  using System.Data;  using System.Linq;  2. Now Goto your CRM Settings, Add a web resource of type Image.  3. Now Add below codes in the Execute method of your plugin as it is:  public class Class1 : IPlugin    {      public void Execute(IService
go to top image