How to read XML file and update the data in MS CRM 2011? RRS feed

  • Question

  • Hi Folks,

    Can anyone please help me finding some references to read XML files and push the data to MS CRM 2011 preferably by using a console application.

    Please let me know if any ways of handling it in simple ways.



    Wednesday, April 15, 2015 6:15 AM

All replies

  • Hello,

    My first question - have you tried to use search engine to find information?

    So let me bing for you:

    http://letmebingthatforyou.com/?q=C%23%20Read%20Xml%20File - read Xml file using C#

    http://letmebingthatforyou.com/?q=Microsoft%20CRM%20Create%20Record%20C%23 - Create records in CRM using C#

    Dynamics CRM MVP
    My blog

    Wednesday, April 15, 2015 6:48 AM
  • Hi Andrii,

    Thanks for the response.

    I used search engine to find out appropriate solutions. But, I was looking for some quick references on achieving it with a console application. As I don't have much knowledge on which is appropriate, expecting some better solutions in this forum.

    Thanks & Regards,


    Wednesday, April 15, 2015 7:36 AM
  • HI,

    How to read XML file:


    How to work with CRM:

    ClientCredentials credentials = new ClientCredentials();
    credentials.Windows.ClientCredential = new System.Net.NetworkCredential("USER", "Password", "Domain");
    Uri uri = new Uri("http://server/Organization/XRMServices/2011/Organization.svc");
    OrganizationServiceProxy proxy = new OrganizationServiceProxy(uri, null, credentials, null);
    proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
    IOrganizationService service = (IOrganizationService)proxy;
    //using "service" you can create, update and retrieve entities.

    More information here about service functions:


    • Edited by xjomanx Wednesday, April 15, 2015 7:46 AM
    Wednesday, April 15, 2015 7:45 AM