Export and Import a record in XML format using plugin in MS CRM 2011 RRS feed

  • Question

  • Hi All

    I have the requirement to export and import a record in XML format using plugin in mscrm 2011. what is the best possilble way to achive this functionality. any help greatly appriciated.

    Srikanth Reddy

    Tuesday, August 6, 2013 8:53 AM

All replies

  • Depends on the exact situation - I will assume you are talking about something like a message hub, where you want data to be synchronizing between X systems.

    1) for data coming OUT of CRM, you can use plugins - trigger them on Create/Update of a record, and within the plugin translate the record's data into your desired XML (perhaps using classes generated with XSD.exe and a schema file) and send that XML to the desired queue/endpoint/receiver

    2) for data coming IN to CRM, that does not really fit the plugin model currently. What you need to do is parse the incoming XML and then issue the appropriate CRM SDK calls to create the record. (BizTalk WCF Adapter, custom web services, SSIS packages, etc)

     You could attempt to create an attribute on the entity called 'inputXML' or something and use that to just pass in the XML there and parse it in the Create plugin but the problem is you will pretty quickly hit the maximum size of a field in CRM as your XML grows.

    Wednesday, August 7, 2013 5:41 AM