You need to sign in to do that
Don't have an account?

How to add a boolean variable to the apex class
Hi,
I have the following controller and need to add a criteris: AND
Post_Ad__c = TRUE
How do I go about doing this?
Any help is much appreciated!
Many Thanks,
Natasha :)
I have the following controller and need to add a criteris: AND
Post_Ad__c = TRUE
How do I go about doing this?
public class OpportunityController { public List<Opportunity> opp {get;set;} public OpportunityController() { opp = [SELECT Id, Name, CreatedDate, Pathway__c, StageName, Placement__c, LDN_Company__c, Description, Job_Title__c, CloseDate, NextStep, Salary__c, Future_Prospects__c, Duration__c, Training_Delivery_Site__c, Qualification_taken__c, Entry_Requirements__c, Key_Responsibilities__c, Skills_Required__c, Account.Name, Account.BillingPostalCode, Account.BillingStreet, Account.BillingCity FROM Opportunity WHERE (StageName = '2 - Booked for CK' or StageName = '3 - Live' or StageName = '4 - Work Trial') AND (Placement__c = 'New Apprentice')]; } }
Any help is much appreciated!
Many Thanks,
Natasha :)
Please replace your field with existing field and let me know if this works for you.If you still facing any problem then ask for same.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
The query seems to be working fine, but the Visualforce page is still showing the wrong opps.