Skip to main content

Notifications

Business Central forum
Unanswered

Display table of attachments in Document Attachment Factbox

Posted on by 209
Hi.
 
I want to make a pageextension to Document Attachment Factbox to display the attachments uploaded to the record, without having to press the number beside /Documents/ to see the table.
 
 
Above I have added a repeater that puts out the attachments connected to the record, which is exactly what I want, but I want to be able to click on the name of the attachment and download it, just like I can when pressing the /1/ beside the /Documents/ and pressing the name, such as in the screenshot below.
 
 
Below is my pageextension code. I have no idea how I can make the field a clickable one.
 
If I can scrap the code I have now and somehow just insert the table from the screenshot above, I am open for that as well.
 
 
pageextension 50105 SalesOrderPageExt extends /Document Attachment Factbox/
{
    layout
    {
        addlast(Control2)
        {
            repeater(Attatchments)
            {
                field(/File Name/; Rec./File Name/)
                {
                    ApplicationArea = All;
                    Caption = 'File';
                }
            }
        }
    }
}
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 71,232 Super User 2024 Season 2 on at
    Display table of attachments in Document Attachment Factbox
    Hi, very interesting question. This is done using trigger OnDrillDown().
     
    Because it contains the uploaded code, it looks complicated. You can directly use the following code.
    Hope this helps.
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,802 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,129 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,154

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans