SOQL Query:
Following query is to get an Account record last 30 days activity histories.
SELECT Id, (SELECT Id, Subject, CreatedDate FROM ActivityHistories WHERE CreatedDate = LAST_N_DAYS: 30) FROM Account WHERE Id = '0014K000002KAhT'
SOQL Query:
Following query is to get an Account record last 30 days activity histories.
SELECT Id, (SELECT Id, Subject, CreatedDate FROM ActivityHistories WHERE CreatedDate = LAST_N_DAYS: 30) FROM Account WHERE Id = '0014K000002KAhT'