[SalesForce] Activity table in schema builder

When looking at schema builder we see an object Activity. But when I tried to query it, 'entity type Activity does not support query' error is received. What is the purpose of this table and how is it important?

Thanks in advance for your time!

Best Answer

It's the parent "SObject" type that represents Task and Event. It appears only in relationship queries, such as:

SELECT Id, (SELECT Id, Subject, ActivityDate FROM ActivityHistories) 
FROM Account

Of course, this is only a convenience object, because it really represents two distinct objects, and only serves a purpose in queries to collapse both tasks and events into ActivityHistories or OpenActivities.

Related Topic