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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to add a Documents attached option in a custom factbox that is added in a custom page?

(0) ShareShare
ReportReport
Posted on by 625

Hi All,

I have added a custom factbox to a custom page called Project List and i want to add the Documents Attached option under the Attachements section of this factbox,

So i created new page for Document Attachements with Documents Attachment as source table : 

page XXXX3 WfsProjectDocAttachFactbox
{

    Caption = 'Documents Attached';
    PageType = CardPart;
    SourceTable = "Document Attachment";

    layout
    {
        area(content)
        {
            group(Control2)
            {
                ShowCaption = false;
                field(Documents; Count)
                {
                    ApplicationArea = All;
                    Caption = 'Documents';
                    StyleExpr = TRUE;
                    ToolTip = 'Specifies the number of attachments.';
                    trigger OnDrillDown()
                    var
                        projectTable: Record XXXProjectTable;
                        DocumentAttachmentDetails: Page "Document Attachment Details";
                        RecRef: RecordRef;
                    begin
                        RecRef.Open(DATABASE::XXXProjectTable);
                        if projectTable.Get("No."then
                            RecRef.GetTable(projectTable);
                        DocumentAttachmentDetails.OpenForRecRef(RecRef);
                        DocumentAttachmentDetails.RunModal;
                    end;
                }
            }
        }
    }

}
And then attached this page as a part in the fatbox section of my custom list Page :  
         area(Factboxes)
        {

            systempart(Links; Links)
            {
                ApplicationArea = All;
                //Visible = false;
            }
            systempart(Notes; Notes)
            {
                ApplicationArea = All;
            }
            part(XXXProjectDocAttachFactbox; XXXProjectDocAttachFactbox)
            {
                ApplicationArea = All;
            }
        }
But the issue is taking attachment(s) common for a all the records in the list,i want the attachment to work specific for each Project Ids in the list.
Also i want the attachement document section in the Attachment tab not on the Details Tab.
pastedimage1591864089593v1.png
Please HELP!
Thanks in Advance!
I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    Microsoft Employee on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist.  If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add.

    Thanks.

  • AXBOY Profile Picture
    625 on at

    Okay Thank you so much.

    Please do let me know if you find any solution for this problem.

  • AXBOY Profile Picture
    625 on at

    Thank you the reply, but i managed to solve the issue.

    Since its an custom list page where i want to the attach documents functionality in the custom sandbox.So i took the reference from the standard ones, like in Sales Quotes list page the factbox  has "Document Attachment Factbox" page :

    pastedimage1592028479411v1.png

    Which opens up "Document Attachment Details" page : 

    pastedimage1592028551857v2.png

    Now these same pages have been added in Sales Quotes/Orders, Purchase Quotes/Orders,etc. And in code level of these pages, the code was written in such a way that all these standard tables we checked and for each of these table there are cases which handle the attachment process.

    Now , in my case its a standard table, and i cant add my case into the standard code of these pages, so i created custom pages which excatly similar to "Document Attachment Factbox" and  "Document Attachment Details" using the same standard source table "Document Attachment" . The only difference in these i handled the attachment process for my custom table through code in these custom pages.

    pastedimage1592029076255v3.png

    I referred the following to achieve till here : www.cloudfronts.com/.../

    Its working fine, but the only issue i am not able to move it to the Attachment Tab like other standard factboxes.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans