gpt4 book ai didi

javascript - 在 MetadataCache 中找不到名称为 的实体

转载 作者:行者123 更新时间:2023-11-29 10:18:16 26 4
gpt4 key购买 nike

在 Microsoft 的 Dynamics CRM 2011 实践实验室之后,我尝试将自定义 View 添加到响应特定属性的“onchange”的表单。这是我添加自定义 View 的函数:

function HandleOnChangeDVMInformationLookup()
{
var locAttr = Xrm.Page.data.entity.attributes.get("new_referringdvm");

if (locAttr.getValue() != null)
{
var dvmId = locAttr.getValue()[0].id;

var viewDisplayName = "DVM Information";
var viewIsDefault = true;

var fetchXml = '<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="dvminformation"><attribute name="dvminformation_id"/><attribute name="dvminformation_name"/><attribute name="new_firstname"/><attribute name="new_lastname"/><filter type="and"><condition attribute="id" operator="eq" value="' +dvmId +'"/></filter></entity></fetch>';

var layoutXml = '<grid name="resultset" object="10001" jump="dvminformation_name" select="1" icon="1" preview="1"><row name="result" id="dvminformation_id"><cell name="dvminformation_name" width="300" /><cell name="new_firstname" width="125"/></row></grid>';

var control = Xrm.Page.ui.controls.get("new_dvm_information");
control.addCustomView("62e0ee43-ad05-407e-9b0b-bf1f821c710e", "dvminformation", viewDisplayName, fetchXml, layoutXml, viewIsDefault );
}
}

在更改表单中选定的“dvm”并触发此函数后,我收到以下错误:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The entity with a name = 'dvminformation' was not found in the MetadataCache.Detail: -2147217150 The entity with a name = 'dvminformation' was not found in the MetadataCache. 2013-06-10T22:01:49.4392114Z

'dvminformation' 不是我刚刚在XML 中定义的实体名称吗?我错过了一步吗?

谢谢。

最佳答案

dvminformation 不太可能是真实的实体名称。您确定存在具有该名称的实体吗?

打开解决方案并查找实体,然后检查其架构名称。

如果它是自定义实体,它们通常具有 prefix_name 的格式,例如new_timelinenew_alert,在你的情况下它可能只是 dvm_information。如果 dvm 是您的解决方案前缀。

只有系统实体的名称没有下划线,例如contactaccountincidentdvminformation 在我看来不像是系统实体。

关于javascript - 在 MetadataCache 中找不到名称为 <entityName> 的实体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17033694/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com