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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

auto upload attachments to document attachment

(2) ShareShare
ReportReport
Posted on by
I have a requirement which is running a sales order report and then upload that same report to Document attachment table as an attachment automatically.
How to do it?
I have the same question (0)
  • Yael Suarez Profile Picture
    131 on at
    Save the report in Base64 aun Upload into Blob field inside of attachment table
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,763 Super User 2025 Season 2 on at
    I have had similar discussions, and I hope you can refer to the following information.
    Dynamics 365 Business Central: Automatically attaching as PDF to posted sales invoice (Document Attachment)
    Dynamics 365 Business Central: How to copy attachments from Warehouse Receipt to Posted Warehouse Receipt – Customization
     
    Hope this helps.
    Thanks.
    ZHU
     
  • Shathika Karunaratne Profile Picture
    on at
    Yael, 
     
    Could you please send a sample code for that if possible?
  • Suggested answer
    YUN ZHU Profile Picture
    95,763 Super User 2025 Season 2 on at
    Hi, if you are referring to printing Sales - Confirmation, I hope the following code can give you some tips.
    pageextension 50132 MyExtension extends "Sales Order"
    {
        actions
        {
            modify("Print Confirmation")
            {
                trigger OnAfterAction()
                var
                    SalesHeader: Record "Sales Header";
                    DocPrint: Codeunit "Document-Print";
                begin
                    SalesHeader := Rec;
                    SalesHeader.SetRecFilter();
                    DocPrint.PrintSalesOrderToDocumentAttachment(SalesHeader, 1);
                end;
            }
        }
    }
    
     
    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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans