Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

SOQL does not validate when query from GROUP or ORDER objects #89

Closed
cchrisv opened this issue May 10, 2019 · 5 comments · Fixed by #99
Closed

SOQL does not validate when query from GROUP or ORDER objects #89

cchrisv opened this issue May 10, 2019 · 5 comments · Fixed by #99
Assignees
Labels
bug 🐞 App is not working correctly. discussion 💬 Discussing usage, best practices, questions, etc. source: soql Related to getting source records to process from SOQL queries. status: resolved ✅ This has been addressed in a branch and will be scheduled for release in the assigned milestone.
Milestone

Comments

@cchrisv
Copy link

cchrisv commented May 10, 2019

I am getting the following error "error Invalid SOQL Query Expected [0-9a-zA-Z_] but " " found. " when attempting to run the following SOQL query "SELECT DeveloperName FROM Group WHERE Type = 'Queue' AND QueueRoutingConfigId != null ORDER BY CreatedDate ASC " The query runs fine in Developer Console.

@cchrisv cchrisv added the discussion 💬 Discussing usage, best practices, questions, etc. label May 10, 2019
@douglascayers
Copy link
Member

Hi @cchrisv,

Thanks for your interest in Mass Action Scheduler. To help me troubleshoot, please answer the questions in the bug issue template found at https://github.com/douglascayers-org/sfdx-mass-action-scheduler/issues/new?assignees=douglascayers&labels=discussion+%F0%9F%92%AC&template=BUG_REPORT.md&title=

@douglascayers douglascayers added bug 🐞 App is not working correctly. source: soql Related to getting source records to process from SOQL queries. labels Jun 4, 2019
@douglascayers
Copy link
Member

douglascayers commented Jun 4, 2019

I think this may be a bug with the SOQL parser that Mass Action Scheduler uses, soql-parse. I think it's seeing the object name Group and expecting it is trying to define the GROUP BY clause of the query.

This query works fine:

SELECT Name FROM Account WHERE Type = 'Queue' ORDER BY CreatedDate ASC

However, change the FROM object from Account to Group and I get your error:

SELECT Name FROM Group WHERE Type = 'Queue' ORDER BY CreatedDate ASC

@cchrisv
Copy link
Author

cchrisv commented Jun 4, 2019

Thanks for looking into this. I had it on my "to-do" list to fill out the full bug report, sorry.

@douglascayers douglascayers changed the title SQOL query not working? SOQL does not validate when query from GROUP or ORDER objects Jun 19, 2019
@douglascayers
Copy link
Member

I've submitted a PR to the soql-parse repo

@douglascayers douglascayers added this to the Release 2.3 milestone Jun 19, 2019
douglascayers added a commit that referenced this issue Jun 24, 2019
Fixes #89 - support Group and Order objects in FROM clauses

Fixes #67 - support whitespace in date literal criteria
@douglascayers douglascayers added the status: resolved ✅ This has been addressed in a branch and will be scheduled for release in the assigned milestone. label Jun 25, 2019
@douglascayers douglascayers removed the status: resolved ✅ This has been addressed in a branch and will be scheduled for release in the assigned milestone. label Jul 21, 2019
@douglascayers
Copy link
Member

Release 2.3 is now available per #99, please see the release notes for full details. Thank you!

@douglascayers douglascayers added this to the Release 2.3 milestone Jul 23, 2019
@douglascayers douglascayers added the status: resolved ✅ This has been addressed in a branch and will be scheduled for release in the assigned milestone. label Jul 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐞 App is not working correctly. discussion 💬 Discussing usage, best practices, questions, etc. source: soql Related to getting source records to process from SOQL queries. status: resolved ✅ This has been addressed in a branch and will be scheduled for release in the assigned milestone.
Development

Successfully merging a pull request may close this issue.

2 participants