Filter any report by current Logged In User in Salesforce | Salesforce Tutorials | Salesforce Development


In this article you will learn to use Running User to filter report by current Logged In user. In my case I am having a report with a user Id field in which I am storing the user's id.

That report is available on each user's dashboard. Now the requirement is to display only current user's record on this report. I.E. if user "A" is logged in so he should see only his records on that report.


By default it is not possible to filter a report by the current user. But there is a workaround available for that : 

  1. Create a formula field on your object which must be having User's lookup field.
  2. Datatype : Formula(18,0)
  3. Formula : If(User_lookup__c= $User.Id,1,0)
  4. Create a report with field criteria where Your_Field__c= 1
The above field will be try whenever the User_lookup__c and the Running User values will be true.

 


If you have any question please leave a comment below.
If you would like to add something to this post please leave a comment below.
Share this blog with your friends if you find it helpful somehow !

Thanks
Keep Coding 

Post a Comment

0 Comments