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
michaellee.ampfmichaellee.ampf 

Can you get Event/Task record type information from ActivityHistories object?

I'd like to be able to use the ActivityHistories object to get the last five closed activities on a contact.  However, I'd like to be able to filter those, if possible, by the record types of the underlying Task and Event.  Is this possible through the ActivityHistories object, or am I going to have to query the Task and Event objects separately, and then combine it all together?

 

I've been playing around to see if I can get something in Force.com Explorer & playing around with SOQL, but no luck so far.

 

Does anyone have suggestions?

 

Thanks,
Michael

sravusravu

 

The entity type ActivityHistory does not support query.

michaellee.ampfmichaellee.ampf

Thanks -- I'm querying the Events and Tasks objects directly to get what I need.

 

I know you can access ActivityHistories indirectly through their related object -- which would have worked for what I was trying to do.  But I don't think I can get that extra piece of info either.

 

Thanks,

Michael