I am trying to upload files to one record while displaying the CombinedAttachments related lists for multiple records. No matter which related list I use to upload files, they always get attached to the first record. I have tried the AttachedContentDocuments related list which will add the file to every record which is not what I want either.

enter image description here

Visualforce Page

<apex:page standardController="Loan_Document__c" extensions="FLLC_LoanDocCreationWizard_Uploader" title="Loan Doc Creation Wizard - Uploader" lightningStylesheets="true">
    <apex:pageMessages ></apex:pageMessages>
    <apex:pageblock title="Upload Attachments for your Application Documents" rendered="{!NOT(is_error)}" mode="edit">
        <apex:pageBlockButtons >
            <input type="button" value="Done" onclick="Done();" class="btn"/>
        <apex:repeat value="{!doc_classes}" var="d">
            <apex:pageBlockSection title="{!d.title}" columns="1">
                <apex:relatedList subject="{!d.doc.id}" list="CombinedAttachments"/>
    <apex:form >
        <apex:actionFunction action="{!Done}" name="Done"/>

Apex Controller

for (Loan_Document__c ld : new_app_docs) {
    DocWithTitle temp = new DocWithTitle();
    temp.doc = ld;
    temp.title = getTitle(ld);

The debug logs show different Ids.

One note that might not be related is that this previously worked in Classic when there were the New Note and Attach File buttons instead.

1 Answer 1


I ended up just making my own tables instead of using Related Lists.

You must log in to answer this question.

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