Advanced record ownership filtering with custom formula fields in Salesforce

Salesforce offers robust record filtering capabilities for list views and reports along with the ability to combine multiple filters with AND/OR/NOT logic.

A special Filter By Owner condition is provided to select either all records, records owned by the current user or records owned by queues.

One of the challenges with Filter By Owner is that it acts as a ‘pre-filter’ and cannot be combined with other criteria:

Salesforce record filtering by owner

However, there are many situations where more flexible filtering is desirable, e.g., to select records that have been:

  • Created by the current user OR Owned by the current user,
  • Created by the current user OR Owned by a queue,
  • Created by the current user AND Owned the user’s department queue.

These scenarios are especially common for objects that are worked on such as tasks, cases, orders, jeopardies, alarms, etc.

Fortunately, Salesforce filtering limitations can be overcome with a few additional formula fields described below (Nextian provides these fields for tasks, orders, work orders, alarms, upgrade opportunities and a few other objects).

These formulas can be re-created on any Salesforce org using Setup → Object Manager → <Your Object>  → Fields & Relationships → New → Formula:

Salesforce formula field editor

Owned By Creator

True (checked) if a record is owned by the user who created it:

Owner.User.Id == CreatedBy.Id
 

This is useful to build filters such as Created by me or Owned by me.

Owned By Me

True (checked) if a record is owned by the current user:

Owner:User.Id == $User.Id
 

This is an equivalent of My Records pre-filter but can be used in conditions such as Created by me or Owned by me.

Queue Owner

True (checked) if a record is owned by a queue:

Owner:Queue.Id != NULL
 

This formula is useful when creating list views with active items that have not been assigned to individual users yet.

Created By Me

True (checked) if a record has been created (but not necessarily owned) by the current user:

Owner.User.Id == CreatedBy.Id
 

This formula is useful to managers who are interested in work progress of items that they created, regardless their current owner.

Owner Full Name

Object owner full name (‘John Doe’) or queue name (‘Engineering’) is a user-friendly replacement for the standard Salesforce owner alias:

IF(Owner:Queue.Id != NULL, 
   Owner:Queue.QueueName, 
   Owner:User.FirstName & ' ' & Owner:User.LastName)
 

This formula can also be created as a hyperlink for easier navigation.

Inactive Owner

Checked if the task is owned by a user (not a queue) and the user is disabled.

IF(Owner:Queue.Id != NULL, false, !Owner:User.IsActive)
 

This helps to filter tasks that are owned by inactive users, so they can be easily re-assigned.

Conclusions

Salesforce offers basic mechanisms of record filtering which can be enhanced with user-defined formula fields to enable advanced filtering scenarios in list views and reports.

Nextian is a vendor of Quote-to-Cash (QTC) software for cloud and communications helping providers accelerate growth and increase customer lifetime value.

Contact us today to find out how we can help you!

Related posts

GET THE NEXTIAN ADVANTAGE

We help enterprises increase revenue, profitability and gain efficiencies by realizing the full potential of the Salesforce platform.

CATEGORIES

Thank you for contacting Nextian. Your request was successfully submitted, we will get back to you within two working days.

BY INDUSTRY

Cloud Infrastructure Providers

Cloud Software Companies

Managed Service Providers

Communications Service Providers

BY ROLE

CEO / Owner

CRO / VP Sales

CFO / VP Finance

COO / VP Operations

CPO / VP Product

CIO / VP IT

Product Management

Plan, launch and manage your product offerings throughout their entire lifecycle.

CPQ & Sales

Quickly create accurate quotes for complex products, subscriptions and add-ons

Order Management

Ensure faster, consistent order delivery with tasks, workflows and automation

Service Management, Support & Monitoring

Retain and upsell customers with comprehensive account intelligence, support, monitoring, analytics

Customer Portal

Empower your customers with 24/7 self-service, support and on-line ordering

NEXTIAN PLATFORM

Platform Overview

Billing Integration

Network Monitoring Integration

Reporting & Analytics