0

I'm trying to create a Field on the User Object that will record the users former profile.

We're creating a Process Builder that will change the users Profile if the user is set to inactive but we want to keep track of the users original profile for keeps sake and/or if we need to revert back. And if the user's profile changes again, back to the Original Profile then we'd like to Something like this:

Original Profile
Inactive Profile
Original Profile

I'm not sure how to do this because the Profile will be changing and we don't simply want a field that mirrors the current profile, instead we want one that tracks the profile history.

Any ideas? & thank you in advance.

Edit Also what Custom Field do I need to add to the User object itself so that this data populates there? Related lists aren't an option on the User Object. Thanks

enter image description hereenter image description here

1 Answer 1

1

You'll need a child object, much like the way Opportunity stage history tracking is handled. This would be an additional custom object; you could call it "User Profile History". On that new custom object, create a lookup to the User ("User"/User__c, a Lookup Relationship) and a text field for the name of the Profile ("Profile Name"/Profile_Name__c, Text field, length 255).

Then, in your Process Builder (which fires on changes to your User record), use an immediate action to Create Records. You'll configure it to create a new User Profile History record each time the profile changes. In the section where you populate field values, you would set the User__c field to the User's Id, populate the old profile name in the Profile_Name__c field, and allow the Created Date of the record to serve as your time-stamp. For both User__c and Profile_Name__c, the type of data you're populating will be a Reference, since you're pulling it from the User record that started the process.

7
  • Hi David, can you clarify on this please? I got lost in the translation. -Create Child Object (In the User field?) User Field>Custom Field>New>Hierarchy?
    – Mr.Smith
    Commented Jan 16, 2019 at 19:59
  • @Mr.Smith I've expanded my answer.
    – David Reed
    Commented Jan 16, 2019 at 20:22
  • Hi David, sorry I'm still struggling with this. Please see edited photos above.
    – Mr.Smith
    Commented Jan 17, 2019 at 13:08
  • I generally recommend against placing one-to-many history information in a single field. Instead, I would run a report on Users with User Profile History. If you must, you could use a Long Text Field and design your process to concatenate the existing value in that field with the changed profile name.
    – David Reed
    Commented Jan 17, 2019 at 15:10
  • I'm totally lost & what I have so far, if activated, causes an error when saving the user after editing.
    – Mr.Smith
    Commented Jan 18, 2019 at 12:24

You must log in to answer this question.

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