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.
Solution:
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.
Please use the Comments section to let us know if this approach worked for you!