0

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:commandLink>
       </apex:column>
      <apex:column value="{!ca.email}"/>
    </apex:pageBlockTable>
   </apex:pageBlock>
   <apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false"/>
  </apex:form>
</apex:page>

Anybody have solution for this problem?

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

Try following changes in the tag as below:

Change

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

to

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.