Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Unanswered

Display table of attachments in Document Attachment Factbox

Posted on by 225
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';
                }
            }
        }
    }
}
Categories:
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,647 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans