You need to sign in to do that
Don't have an account?
Peter Russell 9
What object holds an opportunity's activity log?
I'd like to post activity to opportunities via API - what object sto
res the activity log?
Thanks in advance!
res the activity log?
Thanks in advance!
When an activity is created on the opportunity it stores that activity in two objects:
1- Task object: If you create a task or log a call or send an email through the activity section then it stores these records in the task object.
2- Event object: If you create an event then it stores in the event object.
you can query the activity of opportunity with the help of query given below:
List<Task> OpportunitytaskList = [Select Id, Subject, RecurrenceInterval, Status,
Priority,ActivityDate, WhoId, IsRecurrence, Description,
CallType, CallDisposition, CallObject, CallDurationInSeconds,
IsReminderSet,RecurrenceRegeneratedType,
TaskSubtype, Who.Name,IsClosed
From Task
WHERE WhatId IN: opportunityIdSet
ORDER BY ActivityDate DESC
LIMIT 50000];
List<Event> OpportunityEventList = [SELECT Id, WhatId, StartDateTime, Subject, Type,
What.Name,
EndDateTime, IsAllDayEvent, EventSubtype, ActivityDate,
Description, DurationInMinutes, Location,
IsPrivate, IsReminderSet, IsRecurrence2, ShowAs,
ActivityDateTime
FROM Event
WHERE WhatId IN: opportunityIdSet
ORDER BY ActivityDate DESC
LIMIT 50000];
Hope this helps.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.