You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in console try to run AF::Lead.find_by(first_name: "O'Test")
MALFORMED_QUERY: (Restforce::ErrorCode::MalformedQuery)
FROM Lead WHERE (FirstName = 'O''Test') LIMIT 1
Expected behavior
It should not error out with MalformedQuery
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
stevenskim
changed the title
[BUG]
[BUG] incorrectly escaping quotes for SOQL
Apr 3, 2023
Describe the bug
Active Force is incorrectly escaping quotes resulting in MALFORMED_QUERY error returned.
https://github.com/Beyond-Finance/active_force/blob/main/lib/active_force/active_query.rb#L173-L176
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_quotedstringescapes.htm
To Reproduce
Steps to reproduce the behavior:
AF::Lead.find_by(first_name: "O'Test")
MALFORMED_QUERY: (Restforce::ErrorCode::MalformedQuery)
FROM Lead WHERE (FirstName = 'O''Test') LIMIT 1
Expected behavior
It should not error out with
MalformedQuery
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: