无法将解决方案从PowerApps导入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类型。

另一个解决方案将涉及调整:

  • 导出解决方案
  • 提取溶液拉链
  • 在文本编辑器中打开solution.xml清单
  • 在根ImportExportXml元素中,将属性SolutionPackageVersion的值更改为所需版本
  • 保存您的更改
  • 压缩解决方案
  • 在目标环境中导入修改后的解决方案
<?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>

最后一种方法不能保证导入解决方案时不会出现问题,因为它可能包含以前版本不支持的功能。但是,有时可以手动删除这些功能。

最新更新