Share via


Import Export or the Metadata API?

With CRM4, you have two ways of getting customizations into your system: Import/Export of customizations and the Metadata API. Which one should you use? A: Depends.

If your intention is to create exact replicas of the information, Import/Export is the way to go. If you use the metadata API to create entities, even if you assign the same schema names, the resulting objects will be two different objects. Now, the metadata APIs has the advantage of letting you automate the creation of certain objects (e.g. attributes); you can potentially do things like having a plain text file with all the attributes that you want to create and have a simple loop that uses the CreateAttributeRequest of the metadata API to do the actual creation.

If you are building an installer (to deploy a complex Application built on top of CRM), you can potentially use both of them; for example, use a “skeleton” entity that you create using import export (that way you ensure that the entity is a replica and not a brand new object) and then fill-in the attributes using the Metadata API, this approach ensures that whenever you need to import/export back and forth (from source to target system or vice versa) the entities that you are dealing with are actually the same.

Comments

  • Anonymous
    April 15, 2008
    PingBack from http://microsoftnews.askpcdoc.com/?p=2699

  • Anonymous
    September 10, 2008
    This probably explains a problem I have when I have created an attribute using the web services, and then try to apply a customization that already contains the attribute that I have created. Does this mean that you cannot apply a customization after an attribute has been created using the web service? If the attribute is in the customization then it will create a duplicate field name, and so error. If the attribute is not in the customization then it will be deleted, and so the data will be lost. Have I understood this correctly, and if so, is there any way round it?

  • Anonymous
    September 17, 2008
    Lawrence In CRM 4.0 we NEVER delete metadata when using import/export everything is additive. Also the problem doesn't apply for attributes it applies ONLY if you create the same entity in two different system using the metadata API .  If the entity is initially created using import/export you should be able to do further manipulation of the entity (e.g. add attributes) with the metadata API without any problems.