cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rackhay
Frequent Visitor

CDS Current Environment Trigger on Date Range

I'm attempting to setup a flow which triggers on a CDS (Current Environment) create, specifically around date.

 

I'm using the Filter Expression using a few conditions, and one looking at a date range of the 'arrivaldate' field.

I want this to trigger when that Arrival Date is in the next 3 days.

Using FetchXML Builder (thanks be to our lord Jonas) which usually works out, but its failing on the below where I am assuming the Dynamics expression for NextXDays doesn't exist in an OData format.

 

Is there a way to write this expression with OData? Or should I look at a different method? Not the Current Environment trigger perhaps.

 

Error below:

 

{
  "error": {
    "code""0x80040203",
    "message""Exception parsing (siteid eq '********' and status eq 215500001 and Microsoft.Dynamics.CRM.NextXDays(Name='arrivaldate',PropertyValue=3)) and (PrimaryGuest/contactid ne null) submitted for attribute filterexpression of callback registration. Target entity: booking. Exception: Microsoft.OData.ODataException: An unknown function with name 'Microsoft.Dynamics.CRM.NextXDays' was found. This may also be a function import or a key lookup on a navigation property, which is not allowed.\r\n   at Microsoft.OData.UriParser.FunctionCallBinder.GetUriFunctionSignatures(String functionCallToken, Boolean enableCaseInsensitive)\r\n   at Microsoft.OData.UriParser.FunctionCallBinder.BindAsUriFunction(FunctionCallToken functionCallToken, List`1 argumentNodes)\r\n   at Microsoft.OData.UriParser.FunctionCallBinder.BindFunctionCall(FunctionCallToken functionCallToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.FilterBinder.BindFilter(QueryToken filter)\r\n   at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseFilterImplementation(String filter, ODataUriParserConfiguration configuration, ODataPathInfo odataPathInfo)\r\n   at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseFilter()\r\n   at System.Web.OData.Query.FilterQueryOption.get_FilterClause()\r\n   at System.Web.OData.Query.FilterQueryOption.ApplyTo(IQueryable query, ODataQuerySettings querySettings)\r\n   at System.Web.OData.Query.ODataQueryOptions.ApplyTo(IQueryable query, ODataQuerySettings querySettings)\r\n   at System.Web.OData.Query.ODataQueryOptions`1.ApplyTo(IQueryable query)\r\n   at Microsoft.Crm.ObjectModel.EdmModelEvaluator.EvaluateFilterExpression(String filterExpression, ODataQueryOptions queryOptions)\r\n   at Microsoft.Crm.ObjectModel.EdmModelEvaluator.EvaluateFilterExpression(String filterExpression)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.<>c.<.cctor>b__31_0(EdmModelEvaluator evaluator, String testValue)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.ValidateInputEntity(IBusinessEntity entity, ExecutionContext context, IFeatureDetailContainer featureDetailContainer)"
  }
}
0 REPLIES 0

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (94,596)