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

Salesforce action ODATA query

Hi Experts,

 

I am querying Salesforce through MS-Flow. There are certain date fields in the Salesforce on which I intend to filter my results.

 

When i use the 'Get Records' action in the Salesforce and apply an ODATA filter on the records

 

Screenshot 2019-03-02 at 1.56.48 PM.png

 

I am getting the following error message:

 

Salesforce failed to complete task: Message: 
eStaff_To_Do__c FROM Case WHERE (Data_Migration_Created_Date__c <
                                 ^
ERROR at Row:1:Column:8607
value of filter criterion for field 'Data_Migration_Created_Date__c' must be of type date and should not be enclosed in quotes
clientRequestId: ec00b7ed-def2-4c74-8c1d-80a6598a4732

 

The date is in yyyy-MM-dd format in salesforce. Can anyone point me in the right direction to resolve this issue?

 

Regards,

Namit

3 REPLIES 3
Community Support
Community Support

Hi @namit_gupta ,

 

When configuring Filter Query, if the field type is String, you need to add single quotes outside the string value.

Try adding a single quotation outside of the timestamp, as below:

Data_Migration_Created_Date__c lt '2018-12-02'

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Barry,

 

I tried the mentioned filter. It is giving the same error.

 

Regards,

Namit

Hi @namit_gupta ,

 

Could you share a screenshot of the action configuration?

 

Please ensure that the type of the field is eligible.

In addition, you could try not to configure Filter Query, execute Get records action, and observe how this field is displayed in Body.

Then configure the name of this field in Filter Query.

And follow the previous rules, if the comparison parameter is String or Date, need to add single quotes outside.

 

If this method still doesn't work, you could use Filter array to filter records instead of using Filter Query.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (8,228)