I have to check where the Ids exists in the List of Strings
In the following code, Dependent_Question__c
is a text field which stores the record id. I am getting this in DQList
and checking these list in the below query using IN
operator and I am getting this error:
Error: Compile Error: Invalid bind expression type of MM_Survey_Question__c for column of type String at line 175 column 175
Why am I getting this error and how can I fix it?
List<MM_Survey_Question__c> DQlist=new List<MM_Survey_Question__c>();
DQlist=[select Dependent_Question__c from MM_Survey_Question__c where MM_Survey__c=:surveyRef and Dependent_Question__c!=null];
System.debug('DQ List---'+DQlist);
if(dependentQuestion!=null)
{
dependentQuestionOptions = new List<SelectOption>();
List<MM_Survey_Question__c> qlst = [Select Id, Name From MM_Survey_Question__c where MM_Survey__c=:surveyRef and Type__c='Single Select' and Dependent_Question__c IN:DQlist];
surveyRef
?