You need to sign in to do that
Don't have an account?
Terry411
Insufficient privileges error
I'm getting an insufficient privileges error that I cannot understand why. I have the following pieces of code:
- SalesReportExtension.cls v31
- SalesReport.page v31
- SalesReport.component v31
- Sales_Report.email v31
The user profiles have access to the above code.
Nothing in this code updates or creates Account record however, in-order to run the Sales Report the Profile needs to have Create and Edit rights. Without both, they will get an insufficient privileges error. The Account is the Controller but otherwise there are not updates of any object taking place in the code. It simply is reading sales data associated to the account and summarizing it for the user and allowing them to create a PDF attached to a SF email. The code works fine as an Admin and it works fine if I give the user Create/Edit rights to the Account. Help
- SalesReportExtension.cls v31
- SalesReport.page v31
- SalesReport.component v31
- Sales_Report.email v31
The user profiles have access to the above code.
Nothing in this code updates or creates Account record however, in-order to run the Sales Report the Profile needs to have Create and Edit rights. Without both, they will get an insufficient privileges error. The Account is the Controller but otherwise there are not updates of any object taking place in the code. It simply is reading sales data associated to the account and summarizing it for the user and allowing them to create a PDF attached to a SF email. The code works fine as an Admin and it works fine if I give the user Create/Edit rights to the Account. Help
All Answers
SalesReportExtension.cls
SalesReport.page
SalesReport.component:
Sales_Report.email:
- The profile has access to the VF page SalesReport.
- The associated account record is accessible by the user. As your controller has access modifier with sharing. Any attempt to access inaccessible Accounts may lead to insufficient priviledge error.
- Also please verify if the User has read permission to all of the objects and their fields accessed in your code.
--AkramThe URL is: https://c.cs15.visual.force.com/apex/SalesReport?id=001i000000AbyAI
I saw other post talking about the API version and initially I did have differences there. I have everything set to version 31 now.
https://cs15.visual.force.com/001i000000AbyAI
https://cs15.salesforce.com/001i000000AbyAI
/apex/SalesReport?id={!Account.Id}