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)

Migrate Historical Documents to AX Document Management

(0) ShareShare
ReportReport
Posted on by 1,201

Hi, 

Does anyone has any idea about the historical migration of Documents from legacy applications? Any thoughts on how easy or difficult it could be?

 My idea approach would be to create a script in Dynamics AX and then import the documents to Archive directory one by one based on the documents unique number, which could be Customer account number, Sales order number, etc

If anyone has attempted before please do pour in your thoughts!

Thanks.

*This post is locked for comments

I have the same question (0)
  • Muhammad Afsar Khan Profile Picture
    2,676 on at

    You can use document management framework provided by Microsoft Dynamics AX.

    -Afsar

    mafsarkhan.blogspot.com

  • Praveen Profile Picture
    1,201 on at

    Hello Afsar, Am using the Document Management Framework within Dynamics AX

    The Question is how to migrate the legacy documents to the Document Management Framework from legacy.

    Let me give you an example, I am able to migrate the Customers, now I would need to migrate the Relevant documents(pdf's, jpg,etc) of that Customer to the Document Management Framework.

    Just trying to check if anyone has attempted before or has any ideas in this area.

  • Verified answer
    Community Member Profile Picture
    on at

    A basic script to add an document would be:

      DocuRef             docuRef;    

      DocuType            docuType = DocuType::find('DOC'); //TODO: set the documenttype you provided for images  

      DocuActionArchive        docuActionArchive = new docuActionArchive();    

      InventTable inventTable;

      CustTable custTable;

      VendTable vendTable;

      docuRef.clear();  

      docuRef.initValue();  

      docuRef.TypeId      = docuType.TypeId;  

      docuRef.RefCompanyId   = curExt();  

      //TODO:Choose the one you need

      //for documents on items

      docuRef.RefTableId    = inventTable.TableId;  

      docuRef.RefRecId     = inventTable.RecId;  

      //for documents on customers

      //docuRef.RefTableId    = custTable.TableId;  

      //docuRef.RefRecId     = custTable.RecId;

      //for documents on vendors

      //docuRef.RefTableId    = vendTable.TableId;  

      //docuRef.RefRecId     = vendTable.RecId;

      docuRef.Name       = _fileName;  

      docuRef.Restriction   = DocuRestriction::External;  

      if(docuRef.validateWrite())  

      {  

        docuRef.insert();  

      }

      ttsBegin;  

      docuActionArchive.add(docuRef,_fileName);  

      ttsCommit;

    When You combine it with looping through a directory of Files:

    ax2012tipsandtricks.blogspot.nl/.../loop-through-all-files-in-directory.html

    You could upload all your documents using Ax numbersequences, and letting Ax store your files in archive directory.

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
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans