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 :
Finance | Project Operations, Human Resources, ...
Answered

Using data from attachments to use in X++ in D365

(0) ShareShare
ReportReport
Posted on by 195

Hi All,

I've a Sales Order with two sale lines in it. For both of these lines, I've attached a note using top right attachment tool and for the header of sales order, I did the same.
The requirement is to use these attachment notes in X++ code so I can use them to populate fields on report.
Is there any way to get reference from like first sales line to the respective attachment and same for all?

Any code or suggestions?

Regards,
Ali

1526.pastedimage1574981204617v5.png

3527.pastedimage1574981061286v2.png

I have the same question (0)
  • Verified answer
    Satish Panwar Profile Picture
    14,673 Moderator on at

    Hi Ali,

    Notes are stored in DocuRef table and has relationship with salesline on reftableid and refrecid. You need to get data from DocuRef table and then print on report. Check relationship in Visual Studio.

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Ali,

    As mentioned, files are saved to docuvalue and docuref tables.

    Here's a similar thread,more details,please refer : dynamicsuser.net/.../attach-files-programmatically-using-x

  • Ali Sajjad Profile Picture
    195 on at

    Thank you all.

    I tried the relationship pointed by Satish and they worked.

    Regards,

    Ali

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 804

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 639 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 528

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans