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 :
Microsoft Dynamics AX (Archived)

how to attach document

(0) ShareShare
ReportReport
Posted on by 327

hi all i have attached document to docuref table...

but i i open attachment it showing error document not attached...

do i need to update the docvalue table?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sukrut Parab Profile Picture
    71,735 Moderator on at

    if you are attaching through code, refer below link and see what you are doing wrong.

    microsoftdax.blogspot.com/.../x-code-for-document-attachement-in-ax.html

  • karthik143 Profile Picture
    327 on at

    hi mr.sukruth thanks for immediate response i attaching through code only have look

        DocuRef                 docuRef,docurefUpdt;

       DocuValue               docuvalue,docuvalueUpdt;

          docuRef.clear();

           docuRef.RefRecId = itemcreationline.RecId;

           docuRef.RefTableId = tableNum("ItemCreationLine");

           docuRef.RefCompanyId = curext();

           docuRef.Name =_name; // document path name

           docuRef.TypeId = 'File';

           docuRef.insert();

           docuvalue.initValue();

           docuvalue.insert();

           select forUpdate docurefUpdt where docurefUpdt.RecId == docuref.RecId;

           if(docurefUpdt)

           {

               docurefUpdt.ValueRecId = docuvalue.RecId;

               docurefUpdt.update();

           }

           select forupdate docuvalueUpdt where docuvalueUpdt.recid == docuvalue.RecId;

           if(docuvalueUpdt)

           {

               docuvalue =  docuvalue::writeDocuValue(docuref,_name);

           }

    document-error.png

    file attaching when click open document it is giving error

    if i copy that path and paste it in run i can able to see the document..what is the issue i am not getting

  • Sukrut Parab Profile Picture
    71,735 Moderator on at

    Did you try the link  suggested in the above blog ?

  • karthik143 Profile Picture
    327 on at

    no 

  • Suggested answer
    Sukrut Parab Profile Picture
    71,735 Moderator on at

    You can call this method where you have written custom code. Method implementation can be done in class and you can call It where you want to attach document

  • Mea_ Profile Picture
    60,286 on at

    Did you check AOS user has access to that shared folder ?

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 March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
imran ul haq Profile Picture

imran ul haq 8

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans