I am trying to get the record from query from below soql query. I am getting "Variable does not exist: Question__c"
Below is my code
public pagereference loginflowsexornot()
{
List<AggregateResult> ratobj1 = [SELECT Question__c,Order_Sequence__c FROM Rating_Request__c where User__c=:UserInfo.getUserId() and User_Rating__c = 0 group by Question__c,Order_Sequence__c order by Order_Sequence__c LIMIT 1];
System.debug('Get user Id is : ' + UserInfo.getUserId());
System.debug('Query Count size is : '+ ratobj1.size());
System.debug('Get the Question is :' + ratobj1.Question__c);
if (ratobj1.size() == 0)
{
return Auth.SessionManagement.FinishLoginflow('/');
}
else
{
return null;
}
}
Can anyone help or suggest how to get record.
I am trying get the records from SOQL. Can anyone provide sample for my problem