簡體   English   中英

無法將解決方案從 PowerApps 導入 CRM

[英]Cannot import solution from PowerApps to CRM

我需要從 PowerApps(模型驅動)版本 9.2 導出解決方案並將其導入 CRM 版本 9.1。

由於這個版本,我有一個錯誤。 我怎樣才能做到這一點?

您需要為以前的目標版本導出解決方案。 在 .NET/C# 中,您可以使用ExportSolutionRequest執行此操作:

public string ExportSolution(string solutionName, bool asManaged)
{
    var request = new ExportSolutionRequest
    {
        SolutionName = solutionName,
        Managed = asManaged,
        TargetVersion = "9.1"
    };

    var response = _service.Execute(request) as ExportSolutionResponse;

    string solutionZipPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
    File.WriteAllBytes(solutionZipPath, response.ExportSolutionFile);

    return solutionZipPath;
}

在上面的示例中, _serviceIOrganizationService類型。

另一種解決方案將涉及調整:

  • 導出解決方案。
  • 提取溶液 zip。
  • 在文本編輯器中打開 solution.xml 清單。
  • 在根ImportExportXml元素中,將屬性SolutionPackageVersion的值更改為所需的版本。
  • 保存您的更改。
  • Zip 解決方案。
  • 在目標環境中導入修改后的解決方案。
<?xml version="1.0" encoding="utf-8"?>
<ImportExportXml version="9.2.21082.140" SolutionPackageVersion="9.2" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SolutionManifest>
...
  </SolutionManifest>
</ImportExportXml>

最后一種方法不能保證解決方案可以毫無問題地導入,因為它可能包含以前版本不支持的功能。 但是,有時可以手動刪除這些功能。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM