Thursday, August 8, 2019

How to get activity history of a object using SOQL in Salesforce

ActivityHistory is a standard object is displayed in a related list of closed activities—past events and closed tasks—related to an object.

SOQL Query
SELECT Id, (SELECT Id, Subject, CreatedDate FROM ActivityHistories WHERE CreatedDate = LAST_N_DAYS: 90) FROM Account WHERE Id = '001G000001uoKEL'


No comments:

Post a Comment