function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dea73Dea73 

Malformed query

Why is this a malformed query?

 

SELECT Id, Circuit_ID__c
FROM Circuits__c
WHERE Z_Location_LU__c IN (Select (Select Location_Name__c From Demarcation__r where id = 'a08Q0000003xSVy') From Location__c l)

 

Thanks for the help!

Ankit AroraAnkit Arora

Malformed Query means you have some syntax error in your query, you must be running this from eclipse.

 

Try running in System logs to get the exact error.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

Chamil MadusankaChamil Madusanka

Hi,

 

Adding to Ankit's reply, dont use hardcoded IDs in SOQL queries.

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

Ankit AroraAnkit Arora

It's not only about removing hardcode Ids from query, there are many problems in query like we need to check the child relationship name (Demarcation__r in this case) is correct or not.

 

Innerquery is written in proper format or not.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page