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 :
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,671 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
    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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans