How to retreive CRM records from an Entity using Fetch XML in Dynamics CRM and show on Grid view using c#. How to Bulk delete records from CRM using c#
In this blog I am going to explain how we could retrive/ delete all records from an entity in CRM using C#. For this demo I have taken a windows application, check the below steps and use the code as it is. This code also includes code how we could show Entity data in Gridview. 1. First of all take two different buttons. First button for retreiving records and 2nd button is for deleting records from an entity in CRM. 2. Place a Gridview control too in your form. 3. Now place code as below on Browse, Bulk_Upload button:: OrganizationService _orgservice = new OrganizationService(CrmConnection.Parse("Url=https://yourSolution.crm5.dynamics.com; Username=admin@yourSolution.onmicrosoft.com; Password=pass@word1;")); //Retrive All records from an Entity in CRM using ExecuteMultipleRequest private void btnRtvMultiple_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); EntityCollection