- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- 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
11-13-2012 03:15 PM
This VisualForce page shows the account details for an account using an apex:detail object:
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:
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:
Id value 001U0000005W2cu1 is not valid for the Account standard controller
Solved! Go to Solution.
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.