Pages

Monday, May 26, 2014

Salesforce Last Activity Date

Many of us may not aware if Salesforce has the Last Activity Date. This field is not available in Page Layout, but available in Report, List View, and API (including Formula Field, Workflow, and Validation Rule) for Account, Contact, Opportunity, and Lead object.

It is important to note that the Last Activity Date is different from the Last Modified Date. Last Modified is the date and time stamp for changes (for example, changes to a phone number or an address) made to an individual record.  This also shows the user who made the change.

Last Activity shows when someone in your organization last did something related to the record. It represents one of the following:
  • The latest Due Date of the Completed Task on the related record
  • The latest Date of the Event on the related record
Remember, it is NOT Created Date or Last Modified Date of the Event or Task.


How the Last Activity Date is Calculated?
Each activity record has the different who_id (Contact and Lead) and what_id (other objects) fields in the Task / Event object. However, the value for the Account field is calculated by introspecting the who and the what, with the what taking precedence.

For example: when a user logs a call to a Contact or Opportunity, the Last Activity Date in Contact or Opportunity will be updated, and it will also update the Last Activity Date in the Account too.


Notes:
  • Task/event from a child (for both lookup and master-detail relationship) will not roll up to the parent record, including the Last Activity Date.

Additional Notes about Account Id in Task:
  • If the What is an account, the account_id is that account.
  • If the What is an opportunity, the account_id is the account associated with that opportunity.
  • If the What is a contract, the account_id is the account associated with that contract.
  • If the What is a Custom object that is parented under an account, the account_id is the account associated with that custom object.




No comments:

Post a Comment

Page-level ad