Skip to main content
David Kemp a posé une question dans #Visualforce
Hi,

I have a Visualforce page that is showing Partners progress towards their quarterly targets

One of the queries is failing for users that do not have the ViewAllData permisson:

Select 

FISCAL_QUARTER(p.Opportunity.CloseDate) Qtr, SUM(p.Opportunity.FY_Total__c) Act 

From Partner p 

WHERE p.AccountTo.Name='XXXXXX' 

AND p.IsPrimary=true 

AND p.Opportunity.StageName IN ('04 - Needs Confirmed','05 - Prospect','06 - Meeting Objections','07 - Proposal','08 - Verbal Commitment','09 - Written Commitment','10 - PO in Process','11 - PO Received','12 - PO Received in Finance','13 - Parked') 

AND p.Opportunity.CloseDate=THIS_FISCAL_YEAR 

AND p.Opportunity.Exclude_from_pipeline_reports__c=false 

GROUP BY FISCAL_QUARTER(p.Opportunity.CloseDate) 

ORDER BY FISCAL_QUARTER(p.Opportunity.CloseDate) 

It seems to be the case that the user requires the ViewAllData permission in order to query this data, is that correct?

If that is the case, is there a way round this as otherwise all the sales users will be able to see all the report folders, which is something we want to avoid.

Regards,

David
3 réponses
0/9000