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

relatedList click on item in new window

Hi All,


I have a relatedList for a custom object called Invoice__c. I have overridden the View page with a custom VF page, and would like now to open it in a new browser tab when the user clicks on the Invoice item in the related list. Is there a way to make it happen without recreating a custom related list from scratch?




Can you show the code that you are using for the related list? Depending on what you are doing, if you have a custom link on the list you can set the target to _blank to open the new page in a new window, another good solution I've found, depending on the page's desired functionality, is to set the base href target to _blank, of course the implication of that is that any button or link will open in a new window. 




Here's the code:


       <apex:outputPanel layout="block" title="Invoices"  style="width: 47%; float: left;">
           <apex:relatedList list="Invoice_Statements__r" />