上下文
RetrieveAttributeChangeHistory参数的正确语法是什么?
从Dynamics 365 RetrieveAttributeChangeHistory实体尝试audit。我需要一些帮助来形成OData函数参数的正确语法。现在,我当前的查询引入了名称空间问题。第一个参数需要一个crmbaseentity
类型,因此我为帐户实体提供了完整的名称空间,并且仍然遇到错误。
https://msott.api.crm.dynamics.com/api/data/v9.0/RetrieveAttributeChangeHistory(Target=Microsoft.Dynamics.CRM.account, AttributeLogicalName='numberofemployees', PagingInfo=null)/audits(a1618561-ac5c-e911-b49e-0003ffd79e21)
错误
遇到无效的类型转换。无法从null分配“ Microsoft.Dynamics.CRM.account”
{
"error": {
"code": "0x8006088a",
"message": "Encountered invalid type cast. 'Microsoft.Dynamics.CRM.account' is not assignable from '<null>'.",
"innererror": {
"message": "Encountered invalid type cast. 'Microsoft.Dynamics.CRM.account' is not assignable from '<null>'.",
"type": "Microsoft.OData.ODataException",
"stacktrace": " at Microsoft.OData.UriParser.UriEdmHelpers.CheckRelatedTo(IEdmType parentType, IEdmType childType)\r\n at Microsoft.OData.UriParser.DottedIdentifierBinder.BindDottedIdentifier(DottedIdentifierToken dottedIdentifierToken)\r\n at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n at Microsoft.OData.UriParser.FunctionCallBinder.BindSegmentParameters(ODataUriParserConfiguration configuration, IEdmOperation functionOrOpertion, ICollection`1 segmentParameterTokens)\r\n at Microsoft.OData.UriParser.ODataPathParser.TryBindingParametersAndMatchingOperationImport(String identifier, String parenthesisExpression, ODataUriParserConfiguration configuration, ICollection`1& boundParameters, IEdmOperationImport& matchingFunctionImport)\r\n at Microsoft.OData.UriParser.ODataPathParser.TryCreateSegmentForOperationImport(String identifier, String parenthesisExpression)\r\n at Microsoft.OData.UriParser.ODataPathParser.CreateFirstSegment(String segmentText)\r\n at Microsoft.OData.UriParser.ODataPathParser.ParsePath(ICollection`1 segments)\r\n at Microsoft.OData.UriParser.ODataPathFactory.BindPath(ICollection`1 segments, ODataUriParserConfiguration configuration)\r\n at Microsoft.OData.UriParser.ODataUriParser.Initialize()\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)\r\n at Microsoft.Crm.Extensibility.ODataV4.Routing.CrmODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)"
}
}
}