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

SF.run_highlighted_soql errors out on filter criteria #277

Closed
ognjen-vuceljic opened this issue Jan 31, 2025 · 3 comments · Fixed by #278
Closed

SF.run_highlighted_soql errors out on filter criteria #277

ognjen-vuceljic opened this issue Jan 31, 2025 · 3 comments · Fixed by #278

Comments

@ognjen-vuceljic
Copy link
Contributor

@FedeAbella @xixiaofinland

Following scneario throws an error when running Sf.run_highlighted_soql:

  • multi-line
  • strings in filter criteria

Image

Could you, please, let me know if I am not configuring it properly, or this might be a bug?

Thank you!

@FedeAbella
Copy link
Collaborator

@ognjen-vuceljic you're right that this is an incorrect behaviour. The issue has nothing to do with multiline as far as I can tell, it's just the command escaping the ' in the string which then the sf command doesn't understand.

@xixiaofinland it looks like we should also address the fact that aside from escaping the ', the command also expands any '%', which would be used in LIKE queries.

@FedeAbella
Copy link
Collaborator

@xixiaofinland it looks like the quoting issue is coming from this line:

Image

where we're manually escaping quotes. I've just tried it out without that and it doesn't look like it's needed. Do you remember why that was added in the first place?

I think we should be safe to remove that and change the addParams to the non-expanding version, and that should solve both cases.

I'll upload a PR and you can let me know what you think

@ognjen-vuceljic
Copy link
Contributor Author

Thanks @FedeAbella , looks good to me.

For additional context, this is where the feature initially originated from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants