Formula Fields: Displaying Today’s Date in Long Date Format

Salesforce Simplification header

Did you miss us? Our apologies for the long hiatus!

Now…let’s get down to business!

Everyone knows about Salesforce’s TODAY() function that dynamically displays today’s date in Short Date format (12/31/2000). But what if I want to see the Long Date format?

Create a Formula Field

Today formula


Today formula result

  • Day of the week: This formula works by picking a known Saturday in time (January 6, 1900 for example), subtracting it from today’s date, and using MOD to divide the result by 7 – the remainder is returned as the day of the week.
  • Month: This formula works by displaying the month name based on the month number
  • Day: Because the formula return type is text, we need today’s day returned as a text value
  • Year: Because the formula return type is text, we need today’s year returned as a text value
  • Concatenating: We string everything together by concatenating the results in this formula. We use the ampersand (&) in between each formula and ” ” or “, ” to include a space or comma/space

Copy/paste this formula to use in your Salesforce org:

CASE(MOD( TODAY() – DATE(1900, 1, 6), 7), 0, “Saturday”, 1, “Sunday”, 2,”Monday”, 3, “Tuesday”, 4, “Wednesday”, 5, “Thursday”, 6,”Friday”,””) & “, ” &
1, “January”,
2, “February”,
3, “March”,
4, “April”,
5, “May”,
6, “June”,
7, “July”,
8, “August”,
9, “September”,
10, “October”,
11, “November”,
12, “December”,
& ” ” & TEXT(DAY(TODAY())) & “, ” & TEXT(YEAR(TODAY()))




Thank you for reading our blog! If you have Salesforce tips or tricks you would like to see discussed, tweet @JessSFDC and let me know.

Until next time,may-the-salesforce-be-with-you-footer


Visual Workflow Series Part 1: Use Visual Workflow to Share Records Dynamically

Sharing rules are a great way to make sure your records are accessible to groups of users (such as roles and public groups). Unfortunately, sharing rules cannot be used to share records dynamically, such as with a user in a lookup field on a record. Fortunately, this can be done declaratively using one of our favorite tools: Visual Workflow (with some assistance from its sibling, Process Builder!).

Our general approach to this is similar to the function of the Sharing button in Salesforce Classic – we will share a level of access to a specific record with a specific user. This is done through a separate object called objectNameShare for standard objects and customObjectName__Share for custom objects. As long as a share record exists for your user or for a group to which you belong, you’ll have that level of access on a record. Share records have 4 important fields that we’ll worry about:

  • AccessLevel : this is the level of access granted to the user (picklist values are Read, Edit, and All)
  • ParentId : this is the record ID of the record that is being shared
  • RowCause : this is the reason for sharing the record; for custom objects, custom sharing reasons can be created
  • UserOrGroupId : this is the ID of the group or user with which you are sharing the record

N.B. : for standard objects, the naming convention for these fields is slightly different; OpportunityShare, for example, uses OpportunityAccessLevel and OpportunityId instead of the above field. If you’re not sure what to use, navigate to the object in Workbench and click on the Fields folder for that record. Additionally, sharing is only available for objects where the sharing setting is not Public Read/Write.

Let’s get to sharing! Here’s our user story: our sales team often assigns a Subject Matter Expert (SME) on certain opportunities. These SMEs only need read access on the records they are assigned to, and our org does not use Opportunity Teams (see note). Our SMEs are discovering that they do not have access when they are initially assigned to the opportunity and the salesperson has to manually share the opportunity with the SME. Help the sales team share the opportunities with the assigned SME automatically!

First, we’ll create a flow that will create the sharing record. Using a record lookup block, we will look up an Opportunity where the ID is the same as the value we pass in through the process builder. We’ll call that variable OppVar (text variable, input only). We’ll store the ID of the SME in a variable called SMEVar (text variable, private).

Flow SME Share 1

Next, we’ll check to see if the user already has access to the record with another record lookup. We want to look up any OpportunityShare records where the UserOrGroupId is the same as SMEVar and the OpportunityId is equal to OppVar. Save the value of the OpportunityAccessLevel to a variable called Access (text variable, private). Make sure to check the box to Assign null values to the variable if no record is found.

Flow SME Share 2

Now that we’ve found any existing OpportunityShare records, we will add a decision block to check the value of Access; call that block “Does access exist?”. We’ll create an outcome called “Yes” where Access is not null. We can also rename the Default Outcome “No”.

Flow SME Share 3

Our last step for the flow is to create the share record if the decision block has the “No” outcome. We’ll give Read access, set OppVar as the OpportunityId, set Manual as the RowCause, and SMEVar as the UserOrGroupId.

Flow SME Share 4

We’ll save the completed flow as an Autolaunched flow so we can call it through Process Builder, activate the flow, and then create the process itself! We’ll create a process that runs when a record changes. Select Opportunity as the object and run the process whenever records are created or edited.

Flow SME Share 7

In the criteria, we’ll have this process run when the SME field is not null and changes values.

Flow SME Share 8

Our last step before activating is to add the Flow action. Select Flow as the action type, call the step “Share with SME”, and select your autolaunched flow. Set the variable OppVar to the value of the opportunity’s ID. Save the step and activate the flow!

Flow SME Share 9

Congratulations, you’ve accomplished your task! To test, you can populate the SME field on an opportunity, and then click the Sharing button. You can see a value for that user with Read Only access listed as Manual. Give yourself a pat on the back!

Thanks for reading the first post in our Visual Workflow series! Tune in next week for more on Flows!

Have another topic you’d like to see in the future? Send us a tweet! @BeardforceTyler


Chatter Groups: How to Create Your Own Collaboration Space

Salesforce Simplification header

One of my favorite features inside Salesforce is Chatter, the Salesforce platform for collaboration. Chatter helps users share information across the organization without leaving Salesforce, so everything is discussed in context directly on individual records.

Taking this collaboration one step further, departments and functional teams can collaborate within Salesforce by creating their own Chatter Groups with specific people. This allows users to share project-related or department-related files and information.

In today’s post, we will go over creating Chatter Groups.

Note: We are using the Lightning Experience desktop user interface in this post.


Salesforce users can join up to 300 groups, and your organization can house 30,000 Chatter Groups. Plenty of space for team collaboration! In order to create new Chatter Groups, you must have the Create and Own New Chatter Groups user permission.

Groups blog post 1

You can also use the App Launcher to find Groups

Groups blog post 1.2

Groups blog post 2

Groups blog post 3

Groups blog post 4

Groups blog post 5

Groups blog post 6

Groups blog post 7


Thank you for reading our blog! If you have Salesforce tips or tricks you would like to see discussed, tweet @JessSFDC and let me know.

Until next time,may-the-salesforce-be-with-you-footer




Custom List View Series Part 4: Dynamic List Views

Over the last few weeks, we’ve reviewed how to create List Views in both the Classic Interface and Lightning Experience. Today, we’ll discuss creating a Dynamic List View that you can enable for all or some of your users to give them easy views that they might not be able to create themselves!

Before we start, a quick note: this example assumes that the users already have at least read access to the records that will be included in the List View. You may need to change the Org-Wide Default for the object or add Sharing Rules to open access to certain users.

Let’s get started! Your account managers have Subject Matter Experts (SMEs) who lead sales on complicated deals. This means that the SME will enter the Opportunity into Salesforce and continue to own the Opportunity until it is closed. When the account managers create a List View using My Opportunities, they are missing the Opportunities entered by the SMEs. Help them see all Opportunities on their accounts easily!

This is actually a lot easier than it sounds! We will use a combination of a formula checkbox and a List View to solve for this.

First, let’s add a custom field to the Opportunity object. We’ll choose the Formula field type and Checkbox Formula Return Type. Let’s call the field “My Account”.

dlv 1

Next, we’ll enter the formula. We’ll use $User.Id = Account.Owner.Id .

dlv 2

This formula will return a TRUE (or checked) result when the current user matches the Account Owner. If Jess Beauty owns an Account and Tyler Beard enters an Opportunity on that Account, the box would be checked when Jess looks at it, but unchecked when Tyler looks at it. Neat!

Our last step is to create the List View. We’ll select All Opportunities in the Filter By Owner selection and then filter by My Account equals True in the field filters. Let’s filter to a single record type too; that way the account managers can use inline editing. Select the fields you want to display and the users you’d like to share the List View with.

dlv 6

You’re done! Save and view the awesome new view you’ve given to your users. Now your account managers can easily see all Opportunities on their Accounts, even if they don’t own them!

This methodology can be used on any object as long as the user already has access to the records you would like them to see. We hope this post helps you think of new ways to create Dynamic List Views in your Org! Thanks for reading the fourth post in our List View series! Tune in next week for more!

Have another topic you’d like to see in the future? Send us a tweet! @BeardforceTyler

Custom List View Series Part 3: Charts and Inline Editing


We first discussed list views in the Lightning Experience two weeks ago: Custom List View Series Part 1: The Basics & Filter Overview. Read up on that post if you’re just now joining us!

In today’s post, we will go over creating charts and inline editing.

Note: We are using the Lightning Experience desktop user interface in this post. Check out Tyler’s post from last week to see list views in Salesforce Classic.
Custom List View Series Part 2: Salesforce Classic Overview

Remember the “My Best Opps” opportunity list view? Let’s go back and add some charts.

List View blog post - 112This list view shows my opportunities in the Awaiting purchase order/LOI stage that are $50,000+ in addition to my opportunities from ABC Company.

2List View part 3 blog post - 1

2List View part 3 blog post - 2

2List View part 3 blog post - 3          2List View part 3 blog post - 4

For this chart, we want the sum of the opportunity amount grouped by Close Date and presented in a horizontal bar chart.

2List View part 3 blog post - 5

I need to make some updates to these opportunities, so a great way to easily do so is by inline editing. However, remember my list view filters and filter logic? It includes opportunities in the Awaiting purchase order/LOI stage over $50,000+ OR my opportunities from ABC Company. Because this list view has filter logic, inline editing is unavailable.

Let’s look at the My Open Opportunities list view. This is filtered by Stage and Opportunity Record Type – there is no filter logic.

Note: A list view must be filtered by a single Opportunity Record Type to enable inline editing.

2List View part 3 blog post - 6

Most standard and custom fields are available for inline editing. If a field is not available for inline editing, the lock icon appears. Data security rules apply, of course; users can only edit records they have Read/Write access to.

2List View part 3 blog post - 8

2List View part 3 blog post - 9

2List View part 3 blog post - 110

2List View part 3 blog post - 111


2List View part 3 blog post - 112

Thank you for reading my blog! Eager to learn more on this topic? Stay tuned for our multi-week series on list views – Tyler is up next week!

If you have Salesforce tips or tricks you would like to see in this blog, tweet @JessSFDC and let me know.

Until next time,


Custom List View Series Part 2: Salesforce Classic Overview

Last week, we took a look at List Views in Lightning Experience. Since some organizations haven’t made the move to Lightning quite yet, today we will walk through List Views in the Classic interface.


Like in Lightning Experience, List Views provide an easy way to access data that meets certain parameters, similar to a report. Unlike a report, List Views can allow inline editing, certain actions through List View buttons, and a quick option to delete. If you have a set of data that you work with frequently, List Views are the way to go!

 Accessing List Views

We’ll use the Opportunity object as our example in this post. List views are available for any object that has a Tab, and are accessed by clicking on the Tab.

Toward the top of the screen on the Opportunity home page, you’ll see a dropdown list titled “View”. Using this dropdown list, you can select the view you’d like to access or create a new one. Let’s walk through creating a new List View.


Creating Custom List Views

Let’s create a custom List View for Opportunities that have not been modified in over 2 weeks and are not in the Closed Won or Closed Lost Stages so we can catch deals before they go stale!

When we click on the Create New View link, we’ll be directed to this screen:


First, we’ll enter a name: Stale Opps. The Unique Name will populate automatically.

Next comes the most important part: filtering the list. By default, the list will show all opportunities (that you have at least read access to). We can use up to 10 filters to limit the data that’s shown. Let’s start with our first parameter of Opportunities not in the Closed Won or Closed Lost stage. Click on the first field dropdown and select “Stage”; in the operator dropdown, select “not equal to”; in the value field, click the lookup icon and click the checkboxes for Closed Won and Closed Lost, and click the “Insert Selected” button. Next, we’ll use the second row to add the parameter for Opportunities that haven’t been modified in over 2 weeks. Select “Last Modified Date” in the field dropdown; select “less than” in the operator dropdown(*see read more for additional notes on date operators); type 14 DAYS AGO in the value field. The finished filter section should look something like this:


Next, we’ll need to select which fields we’d like to display in the related list. Let’s select the following from the available fields on the left (hold down Ctrl to select multiple fields) and click the add button to move them to the selected fields on the right: Opportunity Name, Account Name, Amount, Close Date, Stage, Owner Full Name, Last Modified Date, and Last Activity. Now, we can arrange the selected fields in the order we’d like using the Top, Up, Down, and Bottom buttons on the right. Let’s select Owner Full Name and move it just below the Opportunity Name so we can easily see who the owner is.


Lastly, if we have the Manage Public List Views system permission, we can choose whether we’d like this List View to be available to just the user who’s creating it, all users, or just certain groups (we’re able to share with public groups, roles, roles and internal subordinates, or roles and internal and portal subordinates). For this example, we’ll share with the Chief Sales Officer.


All we have to do now is click Save and we’ll have a Custom List View!


In the List View, we can click on any column header to sort alphanumerically ascending (click again to sort descending). We can easily follow records using the green plus sign, edit and delete. If we add an additional parameter to only display a single record type, we can also inline edit (if we have that feature enabled). How easy!

Wow… Test User sure has some outdated Opportunities out there! If we edit the List View and share with all users, we can direct Test User to the List View and show them how they can monitor this list and easily keep all their deals fresh and up-to-date. It’s all about that user experience!

Thanks for reading the second post in our List View series! Tune in next week for more!

Have another topic you’d like to see in the future? Send us a tweet! @BeardforceTyler

Read More »