Overview:
An error occurs when running the Veeva CRM queryRecord CLM API Call:
com.veeva.clm.queryRecord("Question_Response_vod__c", ["Survey_Target_vod__c"], "WHERE createdDate > 2020-12-29T00:00:00.000Z", ["Datetime_vod__c, DESC"], 50, surveyTargetList)
The error is:
queryRecord: queryObject called with invalid WHERE clause: createdDate <2020-12-29T00:00:00.000Z
Root Cause:
The WHERE clause is not valid:
- The first letter of createdDate is not capitalized.
- The date literal string is not enclosed in single quotes.
Solution:
- Capitalize the first letter of createDate.
- Use single quotes around the date literal string.
Example:
com.veeva.clm.queryRecord("Question_Response_vod__c", ["Survey_Target_vod__c"], "WHERE CreatedDate > '2020-12-29T00:00:00.000Z'", ["Datetime_vod__c, DESC"], 50, surveyTargetList)
Related Documentation:
Multichannel Developer Documentation: N/A