• Rabindra Bhowal
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi all,
I'm running some simple queries in Developer Console. My colleague can run these queries and get the information with no issues. When I run the same query, I get the error: "Unknown error parsing query"

I've double and triple-checked for any extra spaces that may have been added in the copy and paste, but it's the same query and I get the error; my colleague does not. We both have identical Administrator profiles, permissions and settings. What could be the issue here? Any help would be much appreciated!
I'm trying to view contacts of accounts that are related to a custom object we have called Our_Role_Service_Affiliation_for_Account__c. I'm able to see the account name, service name and role name but I can't seem to delve into the accounts.

Here's my two SELECT queries I've tried:

1) 
SELECT Id,Name,(SELECT Name FROM Contacts),(SELECT Id,Service__r.Name,Our_Role__r.Name FROM Our_Role_Service_Affiliation_for_Account__r) FROM Account WHERE Id IN (SELECT Account__r.Id FROM Our_Role_Service_Affiliation_for_Account__c WHERE Our_Role__r != 'Outreach')

ERROR at Row:1:Column:171
The inner select field 'Account__r.Id' cannot have more than one level of relationships


2)
SELECT Name,Account__r.Name,Service__r.Name,Our_Role__r.Name FROM Our_Role_Service_Affiliation_for_Account__c WHERE Our_Role__r.Name != 'Outreach' AND Account__r.BillingState = :place.State_Code__c

Works but doesn't show contacts

 
Hi Everyone,
I have problem in soql query,
select a.Name,a.ID,ap.Product__c from account a,accproducts__c ap
where a.id=ap.account__c and ap.Product__r.name='GenWatt Propane 1500kW'  and a.industry='banking';
error:Unknown error parsing query

Standard object:Account
Custom Object :accproducts__c

if anybody knows the solution please tell me.

Thanks & Regard,
M. Sivasankari
hi
  1. This is my query which retrievevs those products which are ordered by more than one customer

List<Contract__c> c=[selectunexpected token: 'select' Product__c from Contract_Line_Item__c where Contract__c IN:
(select Id from Contract__c where Customer__c IN:custIds)];


I get an error for the above line as unexpected token

Any help would be appreciated
Thanks,
Neha
  1.