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
Salesforce BlitzSalesforce Blitz 

No such column error while trying to use custom field in list and set.

list<Student__c> stnewlist=new list<Student__c>();
list<Student__c> stlist=[select id,name from Student__c where Sport__cid in:set2 ];




Error:  No such column 'Library__cid' on entity 'Sport__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.User-added image
srinu_SFDCsrinu_SFDC
Hi Jagadeesh,

   If Sport_c is relation field then just below should work.
  list<Student__c> stlist=[select id,name from Student__c where Sport__c in:set2 ];

Thanks,
Y.Srinivas