A Beginners Guide to Date Stamping in Salesforce

In:

Date stamping can be used in Salesforce to record the date or date/time when a particular field is changed. This is used frequently for capturing the date the lead entered a particular stage or when a lead was first actioned. These fields can be used in reports and dashboards. Let’s dive into how to set this up and some example use cases.

The basics

The best way to date stamp in Salesforce is to create a workflow rule to update the field.

  1. Create the date field

    The first step is to create the field on the object. You can choose either the date field type or the date/time field type.
  2. Create the workflow rule

    Create a new workflow rule (Setup > Proceess Automation > Workflow Rules > New Rule). Select the object you where you just created the field and add the rule criteria.
  3. Add a workflow action to update the field

    Create a workflow action to update the date field. Use a formula field to set the value. If your field type is DATE/TIME use NOW() as your formula. If the field type is DATE use TODAY() as your formula.

Examples

Date stamp a field when a checkbox is checked

Create a workflow rule and select “created, and any time it’s edited to subsequently meet criteria” for your evaluation criteria. Next, add the filters for your rule criteria. In this example, I’m going to date stamp a field when the checkbox for “MQL is Accepted” is checked.

Add a workflow action to update your date field. Select “Use a formula to set the new value”. Your formula should be set to TODAY() unless your field is a DATE/TIME field. In that case, it should be set to NOW().

Now all you need to do is activate your workflow rule and test! Here’s what my completed workflow rule looks like.

Date stamp a field when a picklist value is updated

Create a workflow rule and select “created, and every time it’s editeda” for your evaluation criteria. Select run this workflow if the formula evaluates to TRUE and add your formula. In this example, I want to date stamp my field when the Stage for the lead is updated to Recycle, so my formula looks like this ISChanged(Status) && ISPICKVAL(Status,’Recycle’).

Add a workflow action to update your date field. Select “Use a formula to set the new value”. Your formula should be set to TODAY() unless your field is a DATE/TIME field. In that case, it should be set to NOW().

Now all you need to do is activate your workflow rule and test! Here’s what my completed workflow rule looks like.

Only date stamp the field if the field is currently empty

If you want to date stamp the date field ONLY if it’s currently empty, you can modify the formula in your workflow action.

IF(ISBLANK(My_Date_Field__c), TODAY(), My_Date_Field__c )



Bonus tip: Calculate the number of days between dates

Now that you are a date stamping pro, you can create formula fields to calculate the number of days between dates. These fields can be used in reports to show how many days a lead was in a particular stage, or how long it took sales to action the lead. Here’s an example of what a formula field looks like to calculate the number of days between when the lead was created and the MQL date:

MQL_Date__c – CreatedDate

Questions?

Send me a tweet @jennamolby, or leave a comment below.

Related Posts

  • 02/06/2020
    7 Tips for Organizing Your Campaigns in Salesforce

    Salesforce campaigns can help you track each of your marketing initiatives in detail. These can include online advertisements, emails, or more specialized marketing events such as demos and tradeshows. You can use campaigns to analyze how many leads you are generating, how much pipeline you are building, and how many deals are closing as a result of your marketing efforts. However, in order to track and analyze your campaigns effectively, you need to have an organizational structure in place. Whether you are setting up campaigns for the first time or looking for a way to get more out of campaigns, here are 7 tips to help you get started with your campaign organization.

  • 17/12/2019
    8 Noteworthy Features in the Salesforce Spring ’20 Release

    The Salesforce Spring ’20 release is quickly approaching and soon you’ll be able to take advantage of exciting new features and functionality. Here is a recap of 8 of my favorite features in the release, assigning tasks to a queue, group permission sets, before-save updates in flows and more.

  • 28/08/2019
    9 Noteworthy Features in the Salesforce Winter ’20 Release

    The Salesforce Winter ’20 release is quickly approaching and soon you’ll be able to take advantage of exciting new features and functionality. Here is a recap of 9 of my favorite features in the release, including unique values in report results, scheduling a flow, and more.

Leave A Comment

Your email address will not be published. Required fields are marked *

About Me

Welcome to my blog, where I share, tips, tricks, thoughts and solutions that I learn in my daily life as a Marketing Operations leader.

Categories
Most Commented
Popular Posts