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
Glenn Nyhan 91Glenn Nyhan 91 

SOQL Script Issue

I've created a SOQL script connected to the School object and it runs fine with these criteria -SELECT Name, Country__c, School_Id__c, Teachers__c FROM School__c ORDER BY Country__c ASC

But, when I add other additional criteria from the object i.e. District__c : SELECT Name, Country__c, School_Id__c, Teachers__c, District__c FROM School__c ORDER BY Country__c ASC
I get the following error message: 
INVALID_FIELD    Country__c, School_Id__c, Teachers__c, District__c
                                       ^
ERROR at Row:1:Column:53
No such column 'District__c' on entity 'School__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.    Global School Name Query 8 All Schools Info.soql

Does this mean the field District_c is on another object? Thanks for any help.
Suraj Tripathi 47Suraj Tripathi 47
Hi,
It simply means that the District__c field is not in the School__c object. Yes it can be in another object and if it is in the School__c  object please, check its API name.

Please mark it as Best Answer if it helps you.

Thanks & Regards
Suraj Tripathi

 
hamid khan 13hamid khan 13
As the caption says SOQL Script Issue, so we hope that will be what you can see and like to tell others as well. From here you will be able to suggest more about https://www.australian-writings.org/ so keep trying that and let us know what this is and how it can help.