You need to sign in to do that
Don't have an account?

Date Query Failing
I am having a problem with the following query, but the query below works. I am not sure what the problem is here as I am certain that the date value I am using is properly constrcted.
SELECT
mc.CreatedById, mc.CreatedDate, mc.CurrencyIsoCode, mc.Id, mc.LastModifiedById, mc.LastModifiedDate, mc.Name, mc.Opportunity__c,
mc.SystemModstamp, o.Name, o.AcceptStatus__c, o.AccountId, Opportunity__r.CloseDate
FROM
Manager_Commit_v2__c mc, mc.Opportunity__r o WHERE o.CloseDate > 2007-01-01T05:00:00Z
Here is the error info:
An error has occurred: {faultcode:'sf:INVALID_FIELD', faultstring:'INVALID_FIELD: value of filter criterion for field 'CloseDate' must be of type date and should not be enclosed in quotes', detail:{fault:{exceptionCode:'INVALID_FIELD', exceptionMessage:'value of filter criterion for field 'CloseDate' must be of type date and should not be enclosed in quotes', row:'1', column:'274', }, }, }
Here is the working query.
SELECT
mc.CreatedById, mc.CreatedDate, mc.CurrencyIsoCode, mc.Id, mc.LastModifiedById, mc.LastModifiedDate, mc.Name, mc.Opportunity__c,
mc.SystemModstamp, o.Name, o.AcceptStatus__c, o.AccountId, Opportunity__r.CloseDate
FROM
Manager_Commit_v2__c mc, mc.Opportunity__r o WHERE o.CloseDate > TODAY
Thanks
SELECT
mc.CreatedById, mc.CreatedDate, mc.CurrencyIsoCode, mc.Id, mc.LastModifiedById, mc.LastModifiedDate, mc.Name, mc.Opportunity__c,
mc.SystemModstamp, o.Name, o.AcceptStatus__c, o.AccountId, Opportunity__r.CloseDate
FROM
Manager_Commit_v2__c mc, mc.Opportunity__r o WHERE o.CloseDate > 2007-01-01T05:00:00Z
Here is the error info:
An error has occurred: {faultcode:'sf:INVALID_FIELD', faultstring:'INVALID_FIELD: value of filter criterion for field 'CloseDate' must be of type date and should not be enclosed in quotes', detail:{fault:{exceptionCode:'INVALID_FIELD', exceptionMessage:'value of filter criterion for field 'CloseDate' must be of type date and should not be enclosed in quotes', row:'1', column:'274', }, }, }
Here is the working query.
SELECT
mc.CreatedById, mc.CreatedDate, mc.CurrencyIsoCode, mc.Id, mc.LastModifiedById, mc.LastModifiedDate, mc.Name, mc.Opportunity__c,
mc.SystemModstamp, o.Name, o.AcceptStatus__c, o.AccountId, Opportunity__r.CloseDate
FROM
Manager_Commit_v2__c mc, mc.Opportunity__r o WHERE o.CloseDate > TODAY
Thanks
For anyone tryng the same thing and banging your head like I did for a few hours.
I was trying to use a date field as a dynamic filter for the user. how I finally did it was
CreatedDate: {
gt: new Date(document.getElementById("createdate").value)
obviously you can use a variable but this is where i felt like I hit paydirt.