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

Transfer All old Attachments from Active directory to Database

(0) ShareShare
ReportReport
Posted on by

Hello,

A document type was configured as a location ‘Active Directory’ that solution was used to attach all sort of attachments related to any transaction. It’s clear from here that this attachments are available in a windows directory that was mapped with this particular document type. Due to security and confidentiality issue, I need to reside all records (attachments) to SQL database instead of windows directory so  opened a new document type configured as location ‘Databases’.

 

The issue now that all new attachments will be stored and retrieved from SQL databases that is actually required but the concern is about old attachments that are resided in the windows directory.

Is there a way that all records from windows directory to be transferred to SQL database having the records mapped with the respective transactions.

Thanks in advance

 

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,109 Super User 2025 Season 2 on at

    Hi Haytham,

    There is no standard feature in AX that can move files from the directory towards the database.

    It is possible with programming logic. You need development skills and thourough testing (first in a separate environment) to achieve this.

  • Verified answer
    Haytham Said Profile Picture
    on at

    thank you for you reply, is there any sort of guideline on the code what it should do ? as i guess i need a process to convert and upload the file from directory to database and update the attached file document type on each line attached

  • WPAK Profile Picture
    on at

    Hi,

    regarding a guideline on the code, a good starting point is the class Docu and the method insertfile.

    This is the code where it is determined how the attachment will be ´saved´ (in a archive, in the database etc)

    Be sure to check the parts where DocuFilePlace::Database is used, since that will determine it is saved in the Database.

    Analyzing this part of code might give you an idea on how you can create the code to be able to move the files from a directory to the database

  • Haytham Said Profile Picture
    on at

    Thank you , i also got this info and wanted to share it with you

    "DocuRef table contains references to all the attached docs. So it's a matter of developing a job and make AX scan every record, open the attached file and save it in the database using new parameters. More details must be from a developer"

    What do you think ?

  • WPAK Profile Picture
    on at

    That is definately something that should work.

    Just be aware to only do it for the records that do have a file that is not already saved in the database.

  • Haytham Said Profile Picture
    on at

    Brilliant.

    Thank you very much .

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans