The optional WHERE clause in Salesforce Simple Query node does not work properly with a LIKE statement.
e.g.: Company_Number__c LIKE ‘%1511’ does not work as expected, the % sign must be encoded as %25.
The WHERE clause must be writen as Company_Number__c LIKE ‘%251511’ to have the expected result.
Thank you for the report.
I am not entirely sure if this is a bug. If you use normal ‘%’, this acts like a wildcard. If the account number actually contains the % (in other words, is part of the string), you need to escape it.
The record you are looking for is “%1511” or “xxxx1511” or just “1511”?
Hi ana_ved,
I consider it to be a bug because the function of the % symbol is not consistent.
In the example I gave before I’m filtering on xxxx1511, so the SOQL statement that must arrive at our Salesforce instance is …Company_Number__c LIKE ‘%1511’
But it looks like the underlying REST call is making an interpretation of % as the urlencoding escape char: HTML URL Encoding Reference. The %15 is being replaced by an unprintable character “NAK”.
That is why %251511 works, the underlying urlencoding/decoding replaces the %25 with the actual % character.
I consider it a bug because I, as an end user, should not need to know about the urlencoding.
Also it is inconsistent because a statement with …LIKE ‘%CHRISTOF’ will work as expected: %CH is undefined and the % is left in place. Whereas …LIKE ‘%CARL’ won’t work. %CA represents an accented capital E.
I completely get your point and agree with you, now it is much clearer for me.
I will open a bug ticket for it, thank you for noticing it!
Best wishes
Ana
Ticket created – thank you again for reporting it. When we have it corrected, I will let you know.
Best wishes,
Ana
This issue has been addressed in versions 4.4.4 and 4.5.1 (which have been released today).