You need to sign in to do that
Don't have an account?
Im having trouble with Lists Line 7 Illegal assignment from List to List
Im still learning and i must be doing something wrong im getting an Illegal assignment from List to List on the following code on line 7. Also on a second note does anyone have a link for any books on apex or courses that cover the list functionality please.
public with sharing class monthlylist { public list<Opportunity> Monthly; Date startOfMonth = Date.today().toStartOfMonth(); Date startOfNextMonth = startOfMonth.addMonths(1); public list<Opportunity> Monthly(){ Monthly = [SELECT Owner.Name, COUNT(id) FROM Opportunity WHERE StageName = :'Closed Won, Complete' AND CloseDate >= :startOfMonth AND CloseDate < :startOfNextMonth AND UK_Canada__c = 'UK' GROUP BY Owner.Name]; return Monthly; } }
All Answers