• Francesca Giroldini
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi at all, 
I'm trying to write a test class for a very simple query class, but I receive the error invalid constructor. 
Can anyone help me.
Thank you
public class ClosedTaskListController {
  @AuraEnabled
  public static List<Task> getTasks(ID AccountId) {
    Account a = [Select PersonContactId From Account Where Id = :AccountId];
    return [SELECT Id, Subject, Status, CreatedDate, Owner.Name, Description, Type 
    FROM Task WHERE isClosed=True AND WhoId=:a.PersonContactId ORDER BY createdDate DESC];
  }
    
}