[英]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;
}
在上面的示例中, _service
是IOrganizationService
類型。
另一種解決方案將涉及調整:
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>
最后一種方法不能保證解決方案可以毫無問題地導入,因為它可能包含以前版本不支持的功能。 但是,有時可以手動刪除這些功能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.