Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Display table of attachments in Document Attachment Factbox

Posted on by 188
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:
  • CU01070638-1 Profile Picture
    CU01070638-1 188 on at
    Display table of attachments in Document Attachment Factbox
    That is elegant, and worked perfectly!
  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 64,622 Super User 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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,768 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,985 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans