You need to sign in to do that
Don't have an account?
Francesca Giroldini
test simple query class method
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
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]; } }
Please try this, I think it won't have the above-mentioned issue.
Thanks,
Anil
Please mark this as best answer and upvote if your query has been resolved. Visit my blog to find more about lightning https://techevangel.com/author/anilsomasundaran/
Please try the folowing test class.
Let me know If you have any concern.
Thanks