web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to use the "Doc. Attachment List Factbox" on a custom page

(0) ShareShare
ReportReport
Posted on by 15
Hi, 
 
Apologies for any mistakes as this is my first post. 
 
I have a custom table to which I wish to add the latest document attachment list factbox. 
 
I have been able to do this and have been able to filter attachments to show only those attachments with the table ID and No. of the selected record. 
 
However, I cannot find the correct code to associate new attachments with the selected record on upload. When I select a record and click 'upload files', the resulting attachments are uploaded without reference to the Table ID and Record ID, so they are not displayed in the factbox.
 
I have been able to make it work using a codeunit which uses the older Document Attachment Factbox, but this gives me a warning saying that the Page 'Document Attachment Factbox' is marked for removal. Reason: The "Document Attachment FactBox" has been replaced by "Doc. Attachment List Factbox", which supports multiple files upload.. Tag: 25.0.
 

Version: GB Business Central 25.1 (Platform 25.0.27994.0 + Application 25.1.25873.25976)

Has anyone had success using the new "Doc. Attachment List Factbox" on a custom table and custom page? Any links to working code would be massively appreciated. 

 

Thanks

Joe

 
I have the same question (0)
  • Verified answer
    JN-24121209-0 Profile Picture
    15 on at
    How to use the "Doc. Attachment List Factbox" on a custom page
    I have managed to fix this by amending the code provided here: Dynamics 365 Business Central: Adding a FactBox with a list of attachments | Dynamics 365 Lab .
     
    To make it work, I changed the to reference to the 'OnBeforeDrillDown' event on the "Document Attachment Factbox" page to instead reference the 'OnAfterGetRecRefFail' event in the "Doc. Attachment List Factbox" page.  
     
    It now works and there are no 'marked for removal' warnings. 

    Thank you Yun Zhu!
  • JN-24121209-0 Profile Picture
    15 on at
    How to use the "Doc. Attachment List Factbox" on a custom page
    Thank you, but that is the obsolete page. 
    This is the new one: Page "Doc. Attachment List Factbox" | Microsoft Learn
    I assume the code I require uses the OnBeforeDocumentAttachmentDetailsRunModal Event, but I am struggling to get it to work, so if anyone has achieved this, it would be much appreciated. 
    Thanks
    Joe
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    18,797 Super User 2025 Season 2 on at
    How to use the "Doc. Attachment List Factbox" on a custom page

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans