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
Javaid HussainJavaid Hussain 

Am I getting this error when I run following code? Insufficient Privileges Errors.

<apex:page sidebar="false" showHeader="false" standardController="Account">
    <apex:pageBlock title="Registration">
    <apex:pageBlockSection title="Related Info" columns="1">
        <apex:outputField value="{!Account.Name}"/> 
    </apex:pageBlockSection> 
    <apex:pageBlockSection title="Related Info" columns="1">
        <apex:relatedList list="Cases"/>
    </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>
TobyKutlerTobyKutler
Sounds like the profile does not have access to the VisualForce page. Follow the steps in this link https://salesforce.stackexchange.com/questions/177769/insufficient-privileges-while-accessing-a-visual-force-page-by-other-user
Javaid HussainJavaid Hussain
Hi Toby,
Thanks for your reply, I checked I'm using "System Administrator" and it has full access on visual force pages.
Can you please review my code, I want to show the "relatedList" of Cases.
AnkaiahAnkaiah (Salesforce Developers) 
Hi Javaid,

Refer the below link and modify the code as per your need.
https://www.mstsolutions.com/technical/custom-related-list-using-visualforce-and-apex/

Thanks!!
Noorul AbsarNoorul Absar

I am having the same issue, connected as a system admin and getting "Insufficient Privileges" error

when I am using 'case' as standardController then I am able to see the 'case' details, however 'case' as a relatedList is raising error

<apex:page standardController="Account">
    <apex:pageBlock title="Account Registration">
      <apex:pageBlockSection title="General Info" columns="1">
        <apex:outputField value="{!Account.Name}"/>
        <apex:outputField value="{!Account.Phone}"/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Cases Info" columns="1">
        <apex:relatedList list="Cases"/> 
      </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

Noorul AbsarNoorul Absar
just curious why object as related list is raising 'Insufficient Privilateges' however they are working fine if declare as a standard controller 
TobyKutlerTobyKutler
You need to check your access to Accounts related Cases. If Case has a Private OWD you will need a Sharing Set to give you access to Cases related to Accounts.