Skip to main content
John Neff (Ring2Media) 님이 #Apex에 질문했습니다
Hello!

I would like to add a condition to my controller so that only records that match a certain field value will be evalueted... but I can not get the syntax correct.  Here is what I currently have: 

 

[Select id, name, Call_Volume_This_Week__c, Spend_Last_Week__c, Week_to_Date_SpendFRM__c, Record_Scope__c from Buyer_Performance__c]

And I would like it to function as: 

[Select id, name, Call_Volume_This_Week__c, Spend_Last_Week__c, Week_to_Date_SpendFRM__c, Record_Scope__c from Buyer_Performance__c WHERE Record_Scope__c = "YES"]

How would I properly execute this?

Thanks, 

John
답변 8개
  1. 2015년 2월 19일 오후 6:30
    Hi John,

     Try using single quotes instead of double quotes in WHERE ...

      WHERE Record_Scope__c = 'YES'

     
0/9000