我缩小了这个范围......它看起来像服务预约表格上的一个错误,但想在这里问一下,以防它对其他人有意义......在香草CRM中重新创建,添加了一个javascript文件,并将javascript函数附加到服务的onchange。
要重新创建自己,请将此 javascript 添加到 web 资源,然后将该 web 资源附加到 serviceappointment 表单和服务的 onchange。如果您还没有 2 个服务,请向您的组织添加 2 个服务。创建一个新的服务预约。选择服务 A。然后选择服务 B。保存表单。你会看到错误。
支持所有的javascript,支持自定义表单......一定是CRM的错误,对吧?
哦,关键是,这段代码在更新汇总 11 中有效。在汇总 12 中无效。(我通常坚信“选择没有被破坏”,正如他们所说,但这看起来确实像一个错误。)
function OnChange_Service() {
var serviceId;
serviceId = Xrm.Page.getAttribute("serviceid").getValue();
var targetFieldName = 'customers';
var targetFieldEntityType = 'Account';
var targetFieldEntityId = '610BEA47-7B74-E211-B3EB-78E3B511A6C0'; // use a known accountId
Xrm.Page.getAttribute(targetFieldName).setValue(null);
if (serviceId != null) {
var arrValue;
arrValue = new Array();
var targetField = Xrm.Page.getAttribute(targetFieldName);
if (targetField != null) {
arrValue[0] = new Object();
arrValue[0].entityType = targetFieldEntityType;
arrValue[0].id = targetFieldEntityId;
arrValue[0].name = "not its real name, but who cares";
targetField.setValue(arrValue);
}
}
}
编辑:异常/错误详细信息:
例外是(来自跟踪):
System.FormatException:Microsoft Dynamics CRM 遇到错误。管理员或支持的参考号:#1471AD8A:System.FormatException:Guid 应包含 32 位数字和 4 个破折号 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)。在 System.Guid.GuidResult.SetFailure(ParseFailureKind 失败,字符串 failureMessageID,对象 failureMessageFormatArgument,字符串 failureArgumentName,异常 innerException)在 System.Guid.TryParseGuidWithNoStyle(字符串 guidString,GuidResult& 结果)在 System.Guid.TryParseGuid(字符串 g,GuidStyles 标志, GuidResult& 结果)在 Microsoft.Crm.Application.Platform.AttributeCollection 的 System.Guid..ctor(String g) 在 Microsoft.Crm.Application.Platform.AttributeCollection.CreateEnityReferenceFromLookupPropertyValue(String name, Object value, IOrganizationContext context) 在 Microsoft.Crm.Application.Platform.AttributeCollection。
根据屏幕截图,向用户显示的错误嵌入在表单本身中......我以前从未见过这样的: