Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] incorrectly escaping quotes for SOQL #24

Closed
stevenskim opened this issue Apr 3, 2023 · 0 comments · Fixed by #29
Closed

[BUG] incorrectly escaping quotes for SOQL #24

stevenskim opened this issue Apr 3, 2023 · 0 comments · Fixed by #29
Labels
bug Something isn't working

Comments

@stevenskim
Copy link
Contributor

stevenskim commented 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:

  1. 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.

@stevenskim stevenskim changed the title [BUG] [BUG] incorrectly escaping quotes for SOQL Apr 3, 2023
@stevenskim stevenskim added the bug Something isn't working label Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant