3

The requirement is to show a list of all ownership changes of an Account within the Account tab.

Adding them to the Activity History would be nice, but a separate list is fine, too.

All I (quite new to SF, so I am sorry in advance if I overlooked an obvious solution) have found when researching this is the History Tracking option which indeed logs Account ownership changes, but I haven't even found a hint anywhere how those changes could automatically generate Activity History entries.

Is there any way to achieve this? Simply write "May 17, 2017 - Owner changed from J. Doe to D. Duck"? To Activity History or anywhere else?

2 Answers 2

4

Salesforce uses field history tracking exactly for this purpose:

  1. Go to Accounts => Fields
  2. Click on 'Set History Tracking'
  3. Enable Account History
  4. Check 'Account Owner'
  5. Make sure the Account History related list is on your page layout
1
  • Thanks for the quick answer! That's shockingly simple (and even more worrying that I didn't find this).
    – Olaf
    Commented Oct 12, 2016 at 15:07
1

You accepted the answer that points out field history tracking, despite having said in your question that you'd found the docs on History Tracking. If field history tracking meets your needs, then by all means, use it in good health.

That said, it is quite possible to meet your specific requirement of creating an item in Activity History on ownership change, by using Process Builder. Since you're new to Salesforce, let me recommend Trailhead and the Process Automation module specifically, as an invaluable resource for learning about Salesforce.

In this specific case, you would use Process Buiilder to create a Lightning Process on the Account Object, with a single criterion, using a Condition of the OwnerId field being changed. You would then set an Immediate Action of creating a new record, choosing Task as the Object type. You can then set the fields as needed. You'll want some or all of the following:

  • [Field, Type setting, Value]
  • Due Date Only, Formula, TODAY()
  • Assigned To ID, Formula, $User.Id (this will track who made the ownership change, even if not the previous or subsequent owner)
  • Related To ID, Reference, [Account].Id
  • Status, Picklist, Completed (makes sure it goes right to Activity History)
  • Subject, Formula, "Owner change from " & LEFT(PRIORVALUE([Account].Owner.FirstName ),1) & ". " & PRIORVALUE([Account].Owner.LastName ) & " to " & LEFT([Account].Owner.FirstName,1) & ". " & [Account].Owner.LastName & "."

Another option, similar to Field History Tracking, but potentially more visible to users, is Chatter Feed Tracking, which generates a Chatter post in the record's feed. Chatter Feed tracking is enabled per-object and per-field in the Chatter section of the Setup menu.

1
  • Thanks for what is indeed a more elaborate answer! For now, the customer is happy with the History Tracking solution, but being a programmer rather than a SF pro I really look forward to being able to handling things more from under the surface. I will definitely follow the links you provided. Sounds like a sea of possibilities.
    – Olaf
    Commented Oct 16, 2016 at 11:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .