I need to show only the records which has been created by loggedin user. Iam not thinking to use apex.Need Suggestion.Thanks in advance

  • Do you want to display in a List View or Report?
    – sfdcFanBoy
    Commented Nov 9, 2017 at 9:36
  • in both @sfdcFanBoy Commented Nov 9, 2017 at 9:37
  • @developersfdc check the answer that I have provided.
    – SFDCDJ
    Commented Nov 9, 2017 at 9:38
  • @DhananjayPatil cant i use any out of box functionality?! i mean sharing setting?! Commented Nov 9, 2017 at 9:39
  • 1
    @developersfdc for List View you can see My List View which is salesforce out of the box. e.g. If you are on Account object then you can see 'My Account' list view that display only those records created by you.But in report you need to apply filter for different users.So I recommend to try the workaround that I have provided.You can check this link for more details help.salesforce.com/articleView?id=000214161&type=1
    – SFDCDJ
    Commented Nov 9, 2017 at 9:42

3 Answers 3


You need set the Organization wide default setting of the object to "Private"

Go to Setup --> Sharing Settings --> Edit. Select Private from the dropdown for the respective object.

enter image description here

Private implies that Only the record owner, and users above that role in the hierarchy, can view, edit, and report on those records.

  • can i hide based on Profile like "cc" profile of the loggedin user ==CC then only it should display. Commented Nov 9, 2017 at 10:38
  • 1
    So combination of Loggedin User and his profile isCC Commented Nov 9, 2017 at 10:49

Create a formula checkbox field ($User.Id = [CreatedBy, Owner.Id, etc]) and then filter the report to only pick up records where this field = true.

Worked for me


You need to create a Formula(Text) Field.Lets say I'm creatng Formula Field Current User.

IF( $User.Id = CreatedBy.Id,"Yes", "No" )

Make the Visibility of field to all profile and hide it from page layout.

Create a list view on the object where you want to display the record.Create a new view and set the filter criteria for Current User to True.

This will filter and display all records where Current User name equals Logged in user.

Check the link for more details:



let me know if it helps.

  • this will work for the new entries,for old entries i have to write bacth job for the existing records to update the existing records. Commented Nov 9, 2017 at 9:42
  • 1
    No it will work for old entries too. You are using formula field here so formula field calculates every times.Just create the formula and let me know.
    – SFDCDJ
    Commented Nov 9, 2017 at 9:45
  • @Dhananjay.I tried,it is not showing the records as expected.creating a formula field will not update the field value. Commented Nov 9, 2017 at 9:50
  • 1
    Your formula sets the value to true only if you as loggin user create a record.What is that criteria that you've set in list view?
    – SFDCDJ
    Commented Nov 9, 2017 at 9:51
  • @developersfdc check the link that I have mentioned then you will decide if you want to use it or not.
    – SFDCDJ
    Commented Nov 9, 2017 at 9:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .