gpt4 book ai didi

dynamics-crm-2011 - 属性 'stageid' 属于无法识别的 EdmPropertyKind。实体 new_test 具有重复的导航属性名称

转载 作者:行者123 更新时间:2023-12-04 08:57:44 24 4
gpt4 key购买 nike

我正在使用 CRM2016

我创建了一个测试实体来复制问题

我没有对其进行任何定制。我用默认字段和表单创建了一个新记录。然后我尝试为它访问 webapi

http://localhost/CRMDataBase/api/data/v8.0/new_test(bgcs0249-0a06-e611-941a-003002djlnc)

它运行良好并带来了记录。然后我删除了记录,并为它创建了一个业务流程,只需一个阶段和一个步骤

我激活它并添加了一个新的测试记录并尝试访问 webapi url,但它抛出了以下错误

{ "error":{ "code":"","message":"Property 'stageid' is of an unrecognized EdmPropertyKind. Entity new_test has duplicate navigation property names. All property names (Navigation and Structural property) must be unique in an Entity ","innererror":{ "message":"Property 'stageid' is of an unrecognized EdmPropertyKind. Entity new_test has duplicate navigation property names. All property names (Navigation and Structural property) must be unique in an Entity ","type":"Microsoft.Crm.CrmHttpException","stacktrace":" at Microsoft.Crm.Extensibility.OData.CrmODataEntityTypeSerializer.CreateSelectExpandNode(EntityInstanceContext entityInstanceContext)\r\n at System.Web.OData.Formatter.Serialization.ODataEntityTypeSerializer.WriteEntry(Object graph, ODataWriter writer, ODataSerializerContext writeContext)\r\n
at System.Web.OData.Formatter.Serialization.ODataFeedSerializer.WriteFeed(IEnumerable enumerable, IEdmTypeReference feedType, ODataWriter writer, ODataSerializerContext writeContext)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataFeedSerializer.WriteObject(Object graph, Type type, ODataMessageWriter messageWriter, ODataSerializerContext writeContext)\r\n at System.Web.OData.Formatter.ODataMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content, HttpContentHeaders contentHeaders)\r\n at System.Web.OData.Formatter.ODataMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.WebHost.HttpControllerHandler.d__1b.MoveNext()","internalexception":{ "message":"Property 'stageid' is of an unrecognized EdmPropertyKind.","type":"Microsoft.OData.Core.ODataException","stacktrace":" at Microsoft.OData.Core.UriParser.Parsers.SelectPathSegmentTokenBinder.ConvertNonTypeTokenToSegment(PathSegmentToken tokenIn, IEdmModel model, IEdmStructuredType edmType, ODataUriResolver resolver)\r\n at Microsoft.OData.Core.UriParser.Visitors.SelectPropertyVisitor.ProcessTokenAsPath(NonSystemToken tokenIn)\r\n at Microsoft.OData.Core.UriParser.Visitors.SelectPropertyVisitor.Visit(NonSystemToken tokenIn)\r\n at Microsoft.OData.Core.UriParser.Parsers.SelectBinder.Bind(SelectToken tokenIn)\r\n at Microsoft.OData.Core.UriParser.Parsers.SelectExpandBinder.Bind(ExpandToken tokenIn)\r\n at Microsoft.OData.Core.UriParser.Parsers.SelectExpandSemanticBinder.Bind(IEdmStructuredType elementType, IEdmNavigationSource navigationSource, ExpandToken expandToken, SelectToken selectToken, ODataUriParserConfiguration configuration)\r\n at Microsoft.OData.Core.UriParser.ODataQueryOptionParser.ParseSelectAndExpand()\r\n at Microsoft.Crm.Extensibility.OData.CrmODataEntityTypeSerializer.CreateSelectExpandNode(EntityInstanceContext entityInstanceContext)" } } } }



如果我删除所有记录-> 停用业务流程-> 添加新数据,然后检查 webapi,它工作正常。但是当我激活业务流程并添加新数据时,出现上述错误
P.S:我没有对业务流程和实体进行任何编码/定制。但我仍然收到此错误

可以做些什么来解决这个问题?

最佳答案

看起来像是 Web API 端点中的错误。 Community forums也引用了同样的问题...

Web API 端点仍然有一些限制,它没有完全模仿 OrganizationService 行为,因此,这将用于下一个版本 (9.xx),因此如果您遇到困难,可以尝试应用更新(然后在url) 作为,或提出 MS 支持案例。

如果您仍然卡住,请使用 OData/OrganizationService 尝试相同的方法。

关于dynamics-crm-2011 - 属性 'stageid' 属于无法识别的 EdmPropertyKind。实体 new_test 具有重复的导航属性名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36710030/

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