Simple Salesforce.com Formula to Filter on Records I Created

Salesforce.com provides “My” filters out-of-the-box in Views and Reports to help isolate records owned by the User looking at them.  It doesn’t however provide a straight  forward way to isolate Records created by the User in Views or Reports.  A simple solution is to create a custom formula field on the Object in question, using a cross object formula and system level details of the current user.

Scenario:

At OpFocus we have a Tab called Assignments that we use to track the status of tasks given to team members.  Upon assignment of a record to a team member, Ownership of the record is given to that team member.  Outside of creating Views for each person who might create Assignments, there is no obvious way of creating a “My” View to show ones that the current User created.  As someone who creates a lot of Assignments, it is important that I quickly be able to check the status of all Assignments I’ve created, across many Owners.

Formula to Filter: I Created This RecordSolution:

On the Object in question, in this case a Custom Object called Assignments, we created a formula field called “I Created This Record” which yields text of “True” or “False” depending on whether the current User equals the Created By User. The formula syntax looks like:

IF( CreatedBy.Username = $User.Username, “True”, “False”)

As you can imagine, we don’t need to put this field on a Page Layout (except maybe for testing purposes).  We can simply leverage the field in View or Report Filters as needed.  This approach works on Standard and Custom Objects.

When added within a View Filter, the filter simply looks like the screenshot below.

Use of Formula Field in Field for I Created This Record

Please use the Comments section to let us know if this approach worked for you!

David Carnes - Founder & CEO

about the author

David Carnes

David’s role as Chairman & Chief Digital Evangelist is centered around driving meaningful client engagement and business development. The key to this is serving as an advisor to OpFocus’ SaaS clients as they scale their revenue operations and embrace digital transformation.

In his early career, David worked in IT and operations for software companies, developing an interest in CRM, marketing automation, and analytics while building out systems, processes, data, and reporting for the business teams he supported. He earned a Masters in Software Engineering and credits a Harvard summer class in database management for opening his eyes to what systems could do to support operations. In founding OpFocus in 2006 David took another step toward focusing on business operations, seizing on Salesforce’s vision and never looking back.

David is a frequent speaker at Salesforce and Salesforce community events around the world, mentors through the Trailblazer Mentorship Program hosts Dashboard Dōjō, and serves as a Platform Champion and a Pi-TaP board member. Due to his involvement in the trailblazer community, David’s recently been awarded the position of Salesforce MVP!