SOQL unbounded set of fields error only surfaced upon deployment attempt
Hi Scott,
According to the FIELDS() documentation, FIELDS(ALL)
and FIELDS(CUSTOM)
are not allowed at all in inline Apex.
The inspection shows no problems for the following inline query:
However upon deployment, the problem is surfaced: “The SOQL FIELDS function is not supported with an unbounded set of fields in this API.“
As a sidenote, I could not deploy a class meta with API=56 while the SOQL has this issue. To update the API version, I had to manually intervene on the connection.
Comments (6)
-
reporter -
repo owner Good suggestion. Implemented for the next build:
-
reporter Great! Thanks for making the error message somewhat more precise than the SF documentation
-
repo owner Actually that message isn’t correct. It’s not allowed in Anonymous Apex either. That was a mistake on my part. It’s only allowed in standalone SOQL queries, and it also requires a
LIMIT
clause of at most 200 rows. Updating as appropriate. -
reporter My bad, I misread the documentation. It works as a standalone query because you pass it via SOAP.
-
repo owner - changed status to resolved
Delivered in 2.2.5.0.
- Log in to comment