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

The currently_pulling_query option can cause broken SOQL queries #344

Closed
jonathanstegall opened this issue Mar 19, 2020 · 1 comment · Fixed by #345
Closed

The currently_pulling_query option can cause broken SOQL queries #344

jonathanstegall opened this issue Mar 19, 2020 · 1 comment · Fixed by #345
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jonathanstegall
Copy link
Member

Describe the bug
Users have reported, in #343 with a possible reason for the issue, as well as in the support forum (here, here, and with a possible solution here (thanks to zumajoe in WP forum).

To Reproduce
As far as I can tell, it's like this:

  1. Create a fieldmap that works properly.
  2. Delete some fields from Salesforce
  3. The currently_pulling_query_{object_name} value in wp_options is not deleted.
  4. The SOQL query will be wrong and cause errors

Expected behavior
Either we should delete that value from wp_options, or we should validate the fields in the stored query before running it.

@jonathanstegall jonathanstegall self-assigned this Mar 19, 2020
@jonathanstegall jonathanstegall added the bug Something isn't working label Mar 19, 2020
@jonathanstegall jonathanstegall added this to the v1.9.0 milestone Mar 19, 2020
@jonathanstegall
Copy link
Member Author

I think the way to fix this is to check for a 400 error when the plugin runs a SOQL query. If that happens, we should clear the currently_pulling_query_{object_name} value from wp_options. Then, the next time the plugin ran, it would start over and regenerate the SOQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment