This is a vf page, trying to get &set the query string parameter The page compiled successfully and showing the list of related contacts but when I click the contact name link the following error occurs

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. For more information, seeInsufficient Privileges Errors.

<apex:page standardController="account">
  <apex:form >
   <apex:pageBlock title="contacts" >
    <apex:pageBlockTable value="{!account.contacts}" var="ca">
     <apex:column headerValue="Name" >
      <apex:commandLink > {! ca.name}
       <apex:param name="cid" value="{ca.id}"/>
      <apex:column value="{!ca.email}"/>
   <apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false"/>

Anybody have solution for this problem?

  • Welcome to SFSE. Please provide code for link which redirects to other page.
    – abdn
    Oct 23, 2015 at 16:12

1 Answer 1


Try following changes in the tag as below:


<apex:commandLink > {! ca.name}
   <apex:param name="cid" value="{ca.id}"/>


<apex:commandLink action="/{!$CurrentPage.URL}?cid={!ca.id}"> 
 {! ca.name}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .