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
Ben MeyersBen Meyers 

Error querying lookup field in where clause

I am trying to use a lookup field in the where clause of a soql query (query is below).  For some reason it errors (screen shot attached).  Weird part is I can add the lookup field to the query body without issue.  Salesforce only has an issue when its in the where clause.  Has anyone seen this before?  

User-added image

select id, description, product2id from quotelineitem where quote.quotenumber = '00032686' and product2.sales_type_id__c = 5 and ParentLineItem__r.product2.sales_type_id__c = 4
Pankaj MehraPankaj Mehra
Hi  Ben Meyers,

This error in internal salesforce error and is mostly fixed with time, I tried the query and it worked for me. You can try again or check ParentLineItem__r relationship , I guess this is creating issue