locked
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.

    Thanks,

    Sri

    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
    Moderator
  • 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,

    Sri

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

    How to read XML file:

    https://social.msdn.microsoft.com/Forums/en-US/5dd7261b-86c4-4ca8-ba87-95196ef3ba50/need-to-display-xml-file-in-textboxes-edit-the-data-and-save-the-new-xml-file?forum=csharpgeneral

    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:

    https://msdn.microsoft.com/en-us/library/gg328198.aspx


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