ProfilePhilip RichardsonBlogLists Tools Help
    March 30

    Customization and Source Control

    There was a couple of questions at Convergence last week regarding 'management' of customizations (eg. source control) and CRM 3.0. Recently I took ownership of the ImportExport APIs as part of my feature set - so I thought I would ponder some of the uses of these APIs.
     
    We actually provide some web service method for managing customizations. The six relevant messages are: ImportAllXml, ImportXml, ExportAllXml, ExportXml, PublishAllXml and PublishXml. All six are documented in our SDK and sample code is provided (they are in the following folder: ..sdk samples\reference\crmserviceapi\importexport). For example here is the code to extract the entire customizations xml from a CRM server:
    // Create the request.

    ExportAllXmlRequest request = new ExportAllXmlRequest();

     

    // Execute the request.

    ExportAllXmlResponse response = (ExportAllXmlResponse)service.Execute(request);

     

    // Load the results into an XML document.

    XmlDocument entityXml = new XmlDocument();

    entityXml.LoadXml(response.ExportXml);

    So now you have it an XML file - what do you do. Save it to the file system? How about considering the following options:
    • Use the Sharepoint Web Services to save the XML to a Sharepoint List Library.
    • Integrate directly into VSS.
    • Edit the XML to add version information which is specific to your products.
    • Integrate the Customizations.xml into an existing Visual Studio project.
    • Extract the XML from one server and automatically deploy it to another (eg. Dev to Prod). Simply call the Export method of one server and then the Import & Publish methods of the other.
    • Add some other web services methods into your tool. For example if you want to port the Price list from Dev/Test constantly you could read it out, save the objects as XML and then write them back to the target server.
    • Consider running your Export as a nightly batch job - backing up customizations made to your development server.
    • Writing the Import/Export as an ASP.NET application and then using ISV.config to add a button to CRM enabling you call your custom exporter from within CRM's web UI. You could even add a whole new 'Export Customizations' section to the application.
    If you are a partner or a large customer I'd strongly recommend that you have some kind of build process customized for your unique needs.
     
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Someone on Windows Live

    Comments 

    Trackbacks

    The trackback URL for this entry is:
    http://philiprichardson.spaces.live.com/blog/cns!E1C114B0FC9B3FE!630.trak
    Weblogs that reference this entry
    • None