I am using following uri
api/data/v8.0/new_persons?$filter=_new_employee_id_value eq (guid'b7c6faa1-3ef6-e511-80e8-c4346bddd061')
I am getting following exception when tested in browser
{
"error":{
"code":"","message":"Unrecognized 'Edm.String' literal 'guid'b7c6faa1-3ef6-e511-80e8-c4346bddd061'' at '50' in '_new_employee_id_value eq (guid'b7c6faa1-3ef6-e511-80e8-c4346bddd061')'.","innererror":{
"message":"Unrecognized 'Edm.String' literal 'guid'b7c6faa1-3ef6-e511-80e8-c4346bddd061'' at '50' in '_new_employee_id_value eq (guid'b7c6faa1-3ef6-e511-80e8-c4346bddd061')'.","type":"Microsoft.OData.Core.ODataException","stacktrace":" at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseTypedLiteral(ExpressionLexer lexer, IEdmPrimitiveTypeReference targetTypeReference, String targetTypeName)\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.TryParseLiteral(ExpressionLexer lexer)\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParsePrimaryStart()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParsePrimary()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseUnary()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseMultiplicative()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseAdditive()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseComparison()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseLogicalAnd()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseLogicalOr()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseExpression()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseParenExpression()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParsePrimaryStart()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParsePrimary()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseUnary()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseMultiplicative()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseAdditive()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseComparison()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseLogicalAnd()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseLogicalOr()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseExpression()\r\n at Microsoft.OData.Core.UriParser.Parsers.UriQueryExpressionParser.ParseExpressionText(String expressionText)\r\n at Microsoft.OData.Core.UriParser.ODataQueryOptionParser.ParseFilterImplementation(String filter, ODataUriParserConfiguration configuration, IEdmType elementType, IEdmNavigationSource navigationSource)\r\n at Microsoft.OData.Core.UriParser.ODataQueryOptionParser.ParseFilter()\r\n at System.Web.OData.Query.FilterQueryOption.get_FilterClause()\r\n at Microsoft.Crm.Extensibility.OData.QueryOptionsConverterBase`4.BindFilter(FilterQueryOption filterQuery)\r\n at Microsoft.Crm.Extensibility.OData.DataQueryOptionsConverter.SetFilterExpression(QueryExpression qe, FilterQueryOption filterQueryOption)\r\n at Microsoft.Crm.Extensibility.OData.QueryOptionsConverterBase`4.GetQueryExpression(ODataQueryOptions queryOptions, String edmEntityName, CrmODataExecutionContext context)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.RetrieveEdmEntityCollection(CrmODataExecutionContext context, String entityCollectionName, ODataQueryOptions queryOptions)\r\n at Microsoft.Crm.Extensibility.OData.EntityController.GetEntitySetInternal(String entitySetName, String castEntityName, CrmODataExecutionContext context, CrmEdmEntityObjectCollection crmEdmEntityObjectCollection, ODataQueryOptions queryOptions)\r\n at Microsoft.Crm.Extensibility.OData.EntityController.GetEntitySet(String entitySetName)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}
}