none
[求助CRM 2011]Export SiteMap的相关问题 RRS feed

  • 问题

  • 大家好,

    我想问下有谁知道CRM 2011中如何用程序导出Export SiteMap吗,SDK中貌似没找到相关的示例,希望能够得到大家的帮助~~ 先谢谢大家了。


    crm4.0学步
    2010年12月13日 15:17

答案

  • Export the SiteMap by exporting an unmanaged solution containing the Sitemap. The solution may be the default solution, but to reduce the amount of data that is exported, you may want to add the SiteMap to a solution.

    Use the ExportSolutionRequest message to programmatically export a solution. See Sample: Export or Package a solution for information about how to export a solution programmatically.


    刀客 | MSN:caims@techsun.com | BLOG:http://caims.cnblogs.com | 提供微软CRM高级开发顾问外包
    2010年12月14日 0:30
    版主
  • Sample: Export or Package a solution

    //Export an a solution
    String outputDir = @"C:\temp\";

    ExportSolutionRequest exportSolutionRequest = new ExportSolutionRequest();
    exportSolutionRequest.Managed = false;
    exportSolutionRequest.SolutionName = solution.UniqueName;

    ExportSolutionResponse exportSolutionResponse = (ExportSolutionResponse)_orgService.Execute(exportSolutionRequest);

    byte[] exportXml = exportSolutionResponse.ExportSolutionFile;
    string filename = solution.UniqueName + ".zip";
    File.WriteAllBytes(outputDir + filename, exportXml);


    刀客 | MSN:caims@techsun.com | BLOG:http://caims.cnblogs.com | 提供微软CRM高级开发顾问外包
    2010年12月14日 0:32
    版主

全部回复

  • Export the SiteMap by exporting an unmanaged solution containing the Sitemap. The solution may be the default solution, but to reduce the amount of data that is exported, you may want to add the SiteMap to a solution.

    Use the ExportSolutionRequest message to programmatically export a solution. See Sample: Export or Package a solution for information about how to export a solution programmatically.


    刀客 | MSN:caims@techsun.com | BLOG:http://caims.cnblogs.com | 提供微软CRM高级开发顾问外包
    2010年12月14日 0:30
    版主
  • Sample: Export or Package a solution

    //Export an a solution
    String outputDir = @"C:\temp\";

    ExportSolutionRequest exportSolutionRequest = new ExportSolutionRequest();
    exportSolutionRequest.Managed = false;
    exportSolutionRequest.SolutionName = solution.UniqueName;

    ExportSolutionResponse exportSolutionResponse = (ExportSolutionResponse)_orgService.Execute(exportSolutionRequest);

    byte[] exportXml = exportSolutionResponse.ExportSolutionFile;
    string filename = solution.UniqueName + ".zip";
    File.WriteAllBytes(outputDir + filename, exportXml);


    刀客 | MSN:caims@techsun.com | BLOG:http://caims.cnblogs.com | 提供微软CRM高级开发顾问外包
    2010年12月14日 0:32
    版主
  • 谢谢~~
    crm4.0学步
    2010年12月14日 9:09