philipri's profilePhilip RichardsonBlogLists Tools Help

Blog

    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.

    Comments (0)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    philipri has turned off comments on this page.

    Trackbacks (0)

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