CombinedAttachments Table

  • 1
  • Question
  • Updated 4 years ago
I'm looking to create a table for the CombinedAttachments of a record. My issue is that you are only able to get to this object by using a nested query on the parent object. If this was not the case I would have just created a model for CombinedAttachments but as is, I can only get to this object by using a child relationship on the parent model.

Is there any way for me to create a table component using the child relationship as a model? 

I image someone must have created a table to mimic Salesforce's standard Notes and Attachments table.
Photo of Garrett Smith

Garrett Smith

  • 72 Points

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
I get what you're asking for. The best I can get is the IDs in one comma separated list from this object using the child relationship in the Account. 

Since the CombinedAttachments  object can't be queried, there isn't any way of presenting a table to the user.

We can only get to this data via a template field. Even then, you can only get the IDs of the records. If this could be used to resolve the title of each, then you could make a table with links that make sense. But alas ....

Here's what I've got.
<tab name="Combined" loadlazypanels="true">
               <components>
                  <skootable showconditions="true" showsavecancel="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="AccountData" buttonposition="" mode="read">
                     <fields>
                        <field id="CombinedAttachments" type="CHILDREL" limit="100" valuehalign="" allowhtml="true" delimiter=",">
                           <label>Note or Attachment</label>
                           <template>&lt;a href="/servlet/servlet.FileDownload?file={{{Id}}}" target="_blank"&gt;{{Id}}&lt;/a&gt;</template>
                        </field>
                     </fields>
                     <rowactions>
                        <action type="edit"/>
                        <action type="delete"/>
                     </rowactions>
                     <massactions usefirstitemasdefault="true">
                        <action type="massupdate"/>
                        <action type="massdelete"/>
                     </massactions>
                     <views>
                        <view type="standard"/>
                     </views>
                  </skootable>
               </components>
            </tab>
(Edited)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Pat's going the extra mile.  Thanks for the valiant effort!  This is a frustrating limitation in Salesforce that we are not able to get around at this point.  Sorry.