Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Visualforce Development
- :
- Insufficient Privileges when calling VisualForce p...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Insufficie nt Privileges when calling VisualForc e page with invalid id
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-13-2012 03:15 PM
This VisualForce page shows the account details for an account using an apex:detail object:
<apex:page standardController="Account">
<apex:detail relatedList="false"/>
</apex:page>
Does anyone know why this page would show an error when you call it with an invalid account id in the url? The error is:
Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.
The page works properly when you call it with an valid account id in the url. I gave all roles permissions to view the page in the security definitions for the page, and I'm the admin in this developer account.
When other pages with a standard controller are called with an invalid account id, they return the VisualForce error:
Visualforce Error
Id value 001U0000005W2cu1 is not valid for the Account standard controller
Solved! Go to Solution.
Re: Insufficie nt Privileges when calling VisualForc e page with invalid id
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-13-2012 07:20 PM
an valid account id should be 15 digits or 18 digits, yours is 16 digits, where you got this kind of Id from?
Re: Insufficie nt Privileges when calling VisualForc e page with invalid id
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-14-2012 09:19 AM
Thanks, good catch, I had just entered the extra digit at the end to see how the page handles an invalid account id. Leaving the account id at 15 digits but still with an account id that doesn't exist in my database (i.e. changing the account id in the url) results in the error I'd expect: Data Not Available.

