function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
scottj2scottj2 

SOQL query from the Task object

Why does this query not work:

 

"select type from task"

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

Check the field level security settings for it.

All Answers

SuperfellSuperfell

Works for me, perhaps you can expand on how its not working.

scottj2scottj2

Sorry...should have elaborated more.  The error I'm getting is as follows:

 

 

No such column 'type' on entity 'Task'.

 

 

Also, the Subject is a bit misleading, as it's no necessarily SOQL.  This is being called through the web service API.  After looking at the WSDL, the type field is missing, thus the error message I'm getting.

 

I attempted the query in straight APEX SOQL in a similar fashion, which is why I though it was a SOQL problem.  But in this case, I was using this query:

 

Select type from task where type != null limit 10

 

After which I display the results.  But what I realize now is that our org might have 0 tasks that have a value for the Task Type field (which is also strange since we have a default value set).

 

In any event, why is the Task.type field missing from the API?

 

 

SuperfellSuperfell

Check the field level security settings for it.

This was selected as the best answer
scottj2scottj2

Yup, looks like that type field is hidden by default.  

 

Now, does anyone know how to make the Quick Action buttons default to a specified Type?  My theory is that a visual force page might be required.