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
alexbalexb 

Why is report returning no records? Using no sharing rules, role hierarchy, filters

I want to make a report on Opportunity, Estimates (custom objects), and a detail object on Estimates.

 

First step I did was make a Custom Report Type that related Opportunity, Estimate, and the estimate detail objects. When I made a report based on this CRT, however, I would receive zero records returned. I made a new CRT, this time with just Opportunity and no other objects, but I get the same results.

 

Covering my bases...

- When I run other standard Opportunity reports, I can view the records just fine.

- I checked date and field filters for the report, and there are none.

 

Anything that I'm overlooking? Some permission I'm missing?

 

Thanks for your help in advance! I've been wrestling with this one for a few days, trying to come up with ideas.

 

Edit: I tried the same report with the same CRT in the org's sandbox, and it DOES return Opportuny records in the sandbox (not full-date).

Best Answer chosen by Admin (Salesforce Developers) 
alexbalexb

Ah! The key is to save the report with the "Save hierarchy" checkbox checked. Then, when you run the report, you can see a series of role links along the top of the report.

 

Click a link for a different role, such as the CEO/top-level. Now the report runs from that user's role level.

 

Here's some more info:

"If you don't select to save the hierarchy, then the hierarchy will run with the current running user's level. So if you save the reports but don't set the hierarchy, then you only need to change the running user to see views from different hiearchy levels. "

(source http://success.salesforce.com/ideaView?id=08730000000Bqt1 )

All Answers

alexbalexb

Another user in the org with a different role says that the report returns some opportunity records for her when she runs the report. So it seems that roles are the issue here. This is strange because I am asked to turn on the role hierarchy when I navigate to that section of the setup menu.

 

When viewing a user's role, you can specify that user's read-write access to opportunities, specifically for opportunities that are owned by a user's account.

 

So, the role hierarchy is used in reports, even if it isn't used for record visibility? Is this just for Opportunities or is this for all objects?

alexbalexb

Ah! The key is to save the report with the "Save hierarchy" checkbox checked. Then, when you run the report, you can see a series of role links along the top of the report.

 

Click a link for a different role, such as the CEO/top-level. Now the report runs from that user's role level.

 

Here's some more info:

"If you don't select to save the hierarchy, then the hierarchy will run with the current running user's level. So if you save the reports but don't set the hierarchy, then you only need to change the running user to see views from different hiearchy levels. "

(source http://success.salesforce.com/ideaView?id=08730000000Bqt1 )

This was selected as the best answer