Loading

Differences between Last Activity and Last Modified Dates

Publiceringsdatum: Oct 9, 2026
Beskrivning

Objects related to Tasks and Events include the Last Activity and Last Modified fields. This article explains the difference between the two fields in Salesforce, how Last Activity Date is calculated, and what to keep in mind when you log activities.

Lösning

This article answers what the difference is between Last Activity and Last Modified in Salesforce, and how the Last Activity Date is calculated for an Account.

What Is Last Modified in Salesforce?

Last Modified is the date and timestamp for changes made to an individual record, including the User who made the change.

What Is Last Activity in Salesforce?

Last Activity is the date when a User last did something related to the record. It represents one of the following:

  • The latest Due Date of the Closed Tasks on a record.
  • The latest Start Date of Events on a record.

Example: If a Record has multiple Activities, the "Last Activity" date is the Due Date of the Activity furthest in the future. If the Activity Due Dates are 1/10/2018 and 2/10/2018, the Last Activity is 2/10/2018.

Notes About Last Activity in Salesforce

  • A single Task may be related to more than one record. For example, a Task may be related to both an Account and an Opportunity or both a Contact and a Case. Make sure that records actually reflect last activities by using the "Related To" field whenever you log a call, create a Task, send an email, or schedule an Event.
  • If you use Shared Activities, review their behavior relating to Last Activity Date in Guidelines for Tracking Activities in Additional Resources.
  • Activities captured through Einstein Activity Capture are not tracked in Last Activity. Instead, use the "Last Activity Date" metric to track both core Salesforce activities and those captured through Einstein Activity Capture.

How Salesforce Calculates the Last Activity Date for an Account

Each Activity record has an "account_id" field that is different from the "what_id" and "who_id" fields. However, the value for the "account_id" field is calculated by inspecting the "who" and the "what" (with the "what" taking precedence).

Salesforce uses not just the Activities which have the Account as the "what" but also Activities that roll up to the Account via the Contract, Custom Object, Opportunity, and Contact.

Rules for the "what" in the Last Activity Date Calculation

  • The "what" is an account: The account_id is that account.
  • The "what" is an opportunity: The account_id is the account associated with that opportunity.
  • The "what" is a contract: The account_id is the account associated with that contract.
  • The "what" is a Custom object that is parented under an account: The account_id is the account associated with that custom object.

Rules for the "who" in the Last Activity Date Calculation

If the "account_id" cannot be derived from the "what" using the rules above, then Salesforce looks to the "who." If the "who" is a contact with an associated account, then the "account_id" is the account associated with that Contact.

If no account_id is derived from these methods (for example, there is no "what" or "who" on the Task), the account_id field is left blank.

Once the "account_id" value is determined, and if the Activity is not deleted, the Activity becomes a candidate for Last Activity Date calculations for the associated Account.

Knowledge-artikelnummer

000385365

 
Laddar
Salesforce Help | Article