I am getting an error "No such column 'name' on entity 'Task'. It is coming from my query but I am not querying for 'name'. Please help.
public list<task> getTasks() {
list<account> myaccs = new list<account>([select id from account where ownerid =: userinfo.getuserid()]);
set<id> aid = new set<id>();
for(account a: myaccs){
aid.add(a.id);
}
string sortFullExp = sortfield + ' ' + sortDirection;
mytasks = database.query('SELECT subject, status, priority, reminderdatetime from task order by ' + sortFullExp);
return mytasks;
}