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
Anna Rudenko 9Anna Rudenko 9 

How to add standard button to VF related list?

We have related list for child object on Account level.
I would like to add standard "New" button to it. This button should be opened in the new window. Also I would like some help text being displayed within this related list.
Here is what i got so far:
<apex:page standardController="Account">


        <apex:relatedList list="CSP_Passports__r" title="CSP Passports">
        <apex:facet name="header">If no CSP Passport form yet exists, use "New CSP Passport" button. <br/>
                                  If CSP Passport already exists, you can open it and press <b>Clone</b>.</apex:facet>
    </apex:relatedList>
    <apex:relatedList list="CSP_Passports__r" title="If CSP Passport already exists, open it and press Clone. Otherwise create new form" />
    <apex:facet name="header">If no CSP Passport form yet exists, use "New CSP Passport" button. <br/>
                                  If CSP Passport already exists, you can open it and press <b>Clone</b>.</apex:facet>

</apex:page>
The first part shows related list (but no New button). Plus it shows the comments.
Second part shows New button, but this button openes within this VF page + comments are missing. I put them into title but looks bad
User-added image

Any help is appreciated.