Date Range Filter on a Datetime Field in a Custom Object Writes Date Into SOQL

David LinDavid Lin Member
edited February 17 in Problems
On 11.0.2

Typically, when I create a date range filter on a date/time field on a standard object - it sets conditions with a datetime and works as expected.

I've run into an issue trying to do the exact same thing to a date/time field on a custom object - the model registeredlist soql shows that the filter has tried to set a date as the condition, which throws a soql error.

Can you confirm that this is a bug or an intended behavior?

Thanks.
Error:value of filter criterion for field 'CreatedDate' must be of type dateTime and should not be enclosed in quotes"

Comments

  • David LinDavid Lin Member
    edited October 2018
    Sorry, to be more specific, this is happening in an aggregate model.

    In the basic model, the date range filter does appropriately insert a datetime into the condition.
  • Gregg BaxterGregg Baxter Member
    edited February 17
    Hi David

    Can you be more specific in how you intend using the aggregate model? i.e. What are you grouping or are you trying to aggregate a value according to a date range?

    In the basic model if you expose the data in a table and then add the condition to the table then you need to choose the filter type as date range which will then automatically create the date range as CreatedDate >= & CreatedDate <= which will set the auto filter to autofilter_start_CreatedDate and autofilter_end_CreatedDate.


Sign In or Register to comment.