I'm looking for a way to do a SOQL request to get a Task record, but I keep ending up with this error:
Error: Compile Error: No such column 'What' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. at line 59 column 25
The 'What' field is labeled as 'Related To' (it's a standard field of the Activity object).
Here's my request generating this error:
Task task = [SELECT Type FROM Task WHERE What = :this.person.Id];
Thanks for your solutions.