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
TejTej 

right click on command link not working

i have a list of records which are displayed in a page block table. one of whic is a command link. if i click on it, will open the right record but if i right click on it, it's opening the same record again andagain.

<apex:column>
<apex:commandLink value="View" action="{!viewRecord}">
            <apex:param value="{!record.Id}" name="RowId" assignTo="{!RowId}"/>
        </apex:commandLink>
       
    </apex:column>

public Pagereference viewRecord(){

       
        PageReference ref = new Pagereference('/apex/mypage?id='+RowId);
        ref.getParameters().put('Id',RowId);
   
        return ref;

    }

what am i doing wrong...
Best Answer chosen by Sonam (Salesforce Developers) 
TejTej
mine is bit different. i am right clicking on the link to open a new tab/page, and passing the new row id param. but its opening the duplicate page in new tab instead of opening a new tab/page with passed id.
i got rid of the command link and using out putlink so its working fine now.

All Answers

Sonam_SFDCSonam_SFDC
Hi Tej,

Are you experiencing something similar to what the users have reported on our below idea exchange platform:
https://success.salesforce.com/ideaView?id=08730000000aSCpAAM


TejTej
mine is bit different. i am right clicking on the link to open a new tab/page, and passing the new row id param. but its opening the duplicate page in new tab instead of opening a new tab/page with passed id.
i got rid of the command link and using out putlink so its working fine now.
This was selected as the best answer