Time-Stamping Salesforce: Safeguard Your System Against Undocumented Edits
Are certain areas of your Salesforce.com instance accessed by multiple departments? Does your company struggle to keep track of field updates being made by your team? Here at OpFocus, consultants are often asked how Management can track changes being made in Long Text Fields: “Someone has entered a note to finance to delay billing for this Account, and we need to know who it was,” or “There is an urgent note about the status of this Account. Could it be outdated?”
Some may suggest using the Notes or Attachments features of an Object, however these features appear to be seldom used by the Salesforce community and furthermore cannot be reported on. A simpler resolution that our Salesforce.com Consultants suggest is implementing time stamps into fields that require more detailed information on entered field data.
An excellent way to keep track of who is entering data in fields and when is by time-stamping entries. Time stamps append the User name and modification date to any text field update. Whether a message is being changed or an additional message is being added to a field, time-stamping provides CRM teams a centralized virtual trail of all members’ contributions to an Object.
Disclaimers
Time-stamping is only accessible in Text Fields. If you are looking to keep an extensive communication log of every message ever written in this field, the Long Text data type Field will provide you with ample space to achieve this goal, (32,768 characters, in fact). In addition, to avoid a disordered message log, I would also recommend vocalizing to your team the order you would like new and old messages to appear. For example, here at OpFocus, we place the newest message at the top of a Field to prevent burying the post updated information in outdated messages.
How to Time Stamp: 1,2, Stamp!
To execute a Time Stamp in a Text Field, a Workflow Rule needs to be generated. To launch a Workflow Rule, we need to establish a trigger and an action. Step One is to decide on the Object and Text Field you wish to Time Stamp, then have your System Administrator go to Setup | Create | Workflow & Approvals | Workflow Rules. Select the “New Rule” button and click on the Object for which you want to create the Workflow Rule.
For this Walkthrough, I will share a Time Stamp example used in OpFocus’ Salesforce.com instance. Management wanted to create a Time Stamp for every new note added to the Notes for Finance field on the Contract Object. In this instance, I created a Workflow Rule under the Contract Object, then entered a thoughtful Rule Name and detailed Description. I chose to have this rule evaluated when a Record is created, and every time it’s edited, then set a Formula to run the Rule. When generating your Formula, keep in mind that the Formula must equate to true to trigger the action. Therefore the Formula rule will state that the Notes for Finance field must be changed and/or anything must be entered into the Field in order to activate the action. Such a Formula rule can be written as:
AND(ISCHANGED( Notes_for_Finance__c ),
LEN(Notes_for_Finance__c)>0)
This criteria is called the Workflow “trigger” and is shown in the snapshot below.
Once this Formula is entered and saved, then the Action that this trigger will launch needs to be defined. Under the appropriate header, select the Add Workflow Action dropdown menu, and select New Field Update from the picklist. After adding a name and description to your action, you will select the Field you want to update. In this case, it will be the Notes for Finance field. Now enter in the formula that allows for the modified by and the modified date information to be entered into the Notes for Finance field once the trigger is activated by the rule criteria. One way this action Formula can be written is shown below:
“——” & LEFT( $User.FirstName,1) & ” ” & $User.LastName & “: ” & TEXT(TODAY()) & “——” & BR() & Notes_for_Finance__c
Save the Action and remember to activate the workflow rule before testing if it works.
Because of the complexity of Workflow Rules, I encourage you to use your company’s Sandbox or your own developer org to practice launching your first time stamp. If you need help, don’t hesitate to leave a comment below, or contact a team member at OpFocus! Good luck!