You need to sign in to do that
Don't have an account?
SOQL runs in Apex Explorer 8 but errors in custom apex class
Hi I have created the following SOQL query:
Select a.Application__c, a.Application__r.LastModifiedById, a.Attended_Session__c, a.Event_Session__c from App_Session__c a Where a.Application__r.SBS_event__c = 'a018000000MC48UAAT' and Event_Session__c = 'a0580000005lAMXAA2'
Which runs fine in Apex Explorer.
However when I put it into an apex class controller and attempt to return it as a list I get the following error:
Error: Invalid field Applicant__r for SObject App_Session__c
public class attendeesbyeventcontroller { string eventID = System.currentPageReference().getParameters().get('id'); public string eventsessions { get; set;} public List<App_Session__c> getApplicant() { return [Select a.Application__c, a.Application__r.App_Sessions_Attended__c, a.Application__r.Applicant_Email__c, a.Application__r.Applicant_Name__c, a.Attended_Session__c, a.Event_Session__c from App_Session__c a Where a.Application__r.SBS_event__c = :eventid and Event_Session__c ='a0580000005lAMXAA2' Limit 40]; } }
Can anyone help me with this?