You need to sign in to do that
Don't have an account?
Amy Crumbliss 9
Attachments are false empty in Visualforce Page
I think my syntax is correct, but attachments are empty even for Accounts with attachments.
<apex:page StandardController="Account" readOnly="true" recordSetVar="Accounts" showHeader="false" sidebar="false" cache="false"> <apex:variable var="forceDomain" value="http://districtbridges.force.com" /> <apex:repeat value="{!Accounts}" var="account" rows="1"> <h3>Account: {!account.name}</h3><br /> Attachments:<br /> <apex:repeat value="{!account.Attachments}" var="att"> - {!att.id} {!att.name}<br /> </apex:repeat> EndAttachments<br /> </apex:repeat> </apex:page>
The code seems alright, could you please try removing the rows="1" from the apex repeat and try.
RD
Tried this at my end and Attachments are showing properly whether I keep rows or don't include rows attribute .. the code is repeating and showing attachments under each account (if present against that account).
-
- Tried changing Accounts var to Accounts1
- Tried changing class API version from 40 to 39 to 38
- Tried adding/removing rows attribute
In all above cases, attachments are showing against accounts (if there's any against that account).So not able to actually reproduce "attachment not showing" issue. Please advise if I'm missing anything. Thanks!
Chirag
Explaination:
This is expected behavior and due to Attachments being deprecated in Lightning Experience. Attachments are being superseded and replaced in favor of the more robust FILES feature. Hence what you thought is stored in ATTACHMENTS objects isnt actually right. Its being stored in CONTENTDOCUMENT object.
Read more @ https://help.salesforce.com/articleView?id=Attachments-are-not-returned-in-Lightning-Experience-search&language=en_US&type=1