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
henryCHhenryCH 

Event Time in ActivityHistory

Hi everybody,
I'm working on an SControl that displays a special printable view including the last five Activities of an Account. The Activity object seems pretty helpful since it combines Event and Task data, the only thing that seems to be missing is a field where the Time of an Event is stored. The Duration is available but does it make any sense without the start time of the Event? So it would be great if you could tell me where to find the time of an Event in the Activity History object.

Thanks and best regards,
Henry
werewolfwerewolf
There's a lot to Events that you won't find in the ActivityHistory table.  Try querying directly on the Event table instead.
henryCHhenryCH

Hi werewolf,

Thanks for your response. I agree that it's not necessary to expose every specific Event detail through the ActivityHistory object but even custom fields are available while an essential information like the Event time as the reference point for the Duration is missing. That does not make any sense to me, I would even call it a semantic bug. By the way, the Event time is also not available for use with workflow field updates.

Querying the Event object directly would lead to the necessity to perform at least two separate calls for Tasks and Events to get a realistic glance at the last activities. Since sControl performance is generally low I'd really like to save the second call.

I think I'll do what salesforce.com Support recommends in 9 out of 10 cases and track a new idea.

Best regards,

Henry