function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
prats23prats23 

Generic Report Template

Hi all,

 

I have a requirement to show reports to users based on their own name as the filter criteria.

We have a object which contains the incentives of employees (employees => lookup to user) on monthly basis. The report is to show the employees there own incentives data only, when they click on the link or something for report.

 

I thought of creating a Generic report template which checks for the user id as they login to the system and on clicking the link the filter for the report should take the used name from user id and show respective records! Also, i will make the records

 

Is this feasible in SF? I am not sure how to go about creating a Genereic report! Please suggest!!

 

Also, please suggest is there any other simpler or better way to achieve this requirement?

 

Thanks a lot =)

Best Answer chosen by Admin (Salesforce Developers) 
*werewolf**werewolf*

If you are using these users in the Owner field of the object then this is very simple.  All reports have a filter condition called View: where you can set it to My Objects or All Objects -- so make a report where View: is set to My Objects, and it will automatically filter down to only the records owned by the currently running user.

All Answers

*werewolf**werewolf*

If you are using these users in the Owner field of the object then this is very simple.  All reports have a filter condition called View: where you can set it to My Objects or All Objects -- so make a report where View: is set to My Objects, and it will automatically filter down to only the records owned by the currently running user.

This was selected as the best answer
prats23prats23

Hi *werewolf*,

 

Yes.. that part i understand! But my problem is, how to make a link on click of which the user will see his own specific report?

 

I want the report to take the userid dynamically based on who has logged in!! and then use the user id to fetch record only of that user under My Objects tab (as My accounts) of the Report...

 

Am i clear now? Do you have suggestions?

*werewolf**werewolf*

But that was my point.  If you set the report's filter to be "My Accounts" or whatever, then it will automatically filter to the records owned by the currently-logged-in user.

prats23prats23

Hi!

 

I got it... I created a simple VF page.. and in the controller of it, I am fetching all the data (owned by a user) from object using logged-in user's id! and this custom link i have placed in the home page.. So that when they clik on the link.. they see directly their data..

 

My users are more from business.. dont know much about SF.. want everything on click.. ;)

 

Thank You!