serving the solutions day and night

Pages

Showing posts with label bulk. Show all posts
Showing posts with label bulk. Show all posts

Wednesday, September 4, 2013

MS Dynamics CRM - Bulk Delete using XRM

Import
MSDynamicsCRM2011.DNS.Entities
microsoft.crm.sdk.proxy
microsoft.xrm.client
microsoft.xrm.sdk
System.ServiceModel
System.Data.DataSetExtensions

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Xrm.Sdk.Query;
using GCEntity = BT.CRM2011.DNS.Entities;
using System.ServiceModel.Description;

namespace CRM.Audit.BulkDelete
{
    class Audit
    {
        private BulkDeleteResponse _bdRes;
        private Guid _bdResID;
        private Guid _bdGUID;
        private ConditionExpression _conExp;

//Delete Method
        public void Delete()
        {
            SystemJob(GCEntity.dns_audit.EntityLogicalName, "Audit Bulk Delete - Code", _conExp);
            Console.WriteLine("Audit Deleted");
            SystemJob(GCEntity.Contact.EntityLogicalName, "Contact Bulk Delete - Code", _conExp);
            Console.WriteLine("Contact Deleted");
            Console.ReadLine();
        }


Wednesday, October 3, 2012

Microsoft Dynamics CRM 2011 Data Management - Import, Export, Duplicate & Delete

Import
  • CRM Import Files formats: XML Spreadsheet 2003 (.xml), Comma-separated values (.csv), Rext (.txt), Compressed files (.zip)
  • Include a column for each required field on the entity into which you are importing the data.
  • One import file for each type of entity. 
  • Import multiple files into a single .zip file.
  • Maximum 8 megabytes (MB) size for each import file. 
  • Import Data Wizard basic process: Prepare the import files, Import the file and map the records & View the results and correct failures.
  • Dynamics CRM allows you to create templates for your import that you can download from the system.  In the Settings area -> click Data Management - > click Templates for Data Import. OR On the application ribbon -> click the Import Data button -> select Download Template for Import.
  • An import template outputs an XML file with all of the columns for the entity you selected:
    • All possible data fields for the entity are included.
    • All of the column headers are named and labeled correctly. 
    • Required data field names are bold in the top row.
    • Each cell provides additional information about the data that should go in the field, such as its  data type, maximum and minimum values, or maximum length.
    • For option sets, the template displays a list of the possible values for the field. 
    • If you try to enter a value that is not included in the option set or not in the format, you receive an error message
  • On the application ribbon -> click the Import Data button OR click the File tab -> select Import  OR Data from the Tools menu -> The Import Data Wizard opens.