You need to sign in to do that
Don't have an account?
Sridhar Reddy 65
SOQL is not working as intended
Hello all,
I have below query which should only pick records which have assets created on or after 2018-01-01 and ((LastModifiedDate >= 2018-01-01T08:00:00.000+0000 and LastModifiedDate <= 2018-01-13T08:00:00.000+0000) OR (Last_Integration_Run_Date__c = null))
SELECT Id,Related_Opportunity__r.Id,Related_Opportunity__r.DRG_Order_ID__c, SBQQ__ReferenceContract__r.ERP_Order_ID__c,SBQQ__ReferenceContract__r.Quoted_Currency__c FROM Asset WHERE SBQQ__ReferenceContract__c != '' and Account.Id != '' and Related_Opportunity__r.Finance_Approved__c = true and ERP_DoNotIntegrate__c = false and CreatedDate>=2018-01-01T08:00:00.000+0000 AND ((LastModifiedDate >= 2018-01-01T08:00:00.000+0000 and LastModifiedDate <= 2018-01-13T08:00:00.000+0000) OR (Last_Integration_Run_Date__c = null))
But the above query is also picking assets created before 2018-01-01, can some please let me know if anything is missing in my query which is making it to pick assets which are created before 2018-01-01.
Any help is highly appriciated since this is urgent.
Best Regards,
Sridhar
I have below query which should only pick records which have assets created on or after 2018-01-01 and ((LastModifiedDate >= 2018-01-01T08:00:00.000+0000 and LastModifiedDate <= 2018-01-13T08:00:00.000+0000) OR (Last_Integration_Run_Date__c = null))
SELECT Id,Related_Opportunity__r.Id,Related_Opportunity__r.DRG_Order_ID__c, SBQQ__ReferenceContract__r.ERP_Order_ID__c,SBQQ__ReferenceContract__r.Quoted_Currency__c FROM Asset WHERE SBQQ__ReferenceContract__c != '' and Account.Id != '' and Related_Opportunity__r.Finance_Approved__c = true and ERP_DoNotIntegrate__c = false and CreatedDate>=2018-01-01T08:00:00.000+0000 AND ((LastModifiedDate >= 2018-01-01T08:00:00.000+0000 and LastModifiedDate <= 2018-01-13T08:00:00.000+0000) OR (Last_Integration_Run_Date__c = null))
But the above query is also picking assets created before 2018-01-01, can some please let me know if anything is missing in my query which is making it to pick assets which are created before 2018-01-01.
Any help is highly appriciated since this is urgent.
Best Regards,
Sridhar
All Answers
is causing your problem. Try:
HTH
Scott S Nelson
Thanks for help, but it did not work. Below is the image of dates on which this assett is created and modified.
Can you please help me.
Best Regards,
Sridhar
Yeah thats the problem. Thanks for all your help and support.
Best Regards,
Sridhar