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 :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

How to use the "Customer attachments" data entity to import File type attachments

(0) ShareShare
ReportReport
Posted on by 70

Attachments in D365 can be various types.  One type is called "Note".  A Note type attachment is plain text.  For example, it looks like this…

pastedimage1610640535746v1.png

As you can see, the type is "Note", and under General/Details/Notes, there is the plain text note that is just the text "This is the note message."

 

Another type of attachment in D365 is called "File".  A File type attachment is just like an attachment in an email message.  It could be a DOCX document file, an XLSX spreadsheet, a PDF document, or any other file type at all.  In my case, I'm testing the file attachment import using a DOCX file, but the type of file is irrelevant for this process.

 

For example, here is a File type attachment in D365.

pastedimage1610640535747v2.png

 

You can see in the screen capture that the type of attachment in this case is "File", and in the Attachment fast tab it shows the file information.  The file can be previewed in the "Preview" fast tab.

This is what I expect the end result to look like when I import a D365 "customer attachment" record of type "File."  The challenge I'm facing is how to include the file itself in the import process.  Every time I try to import a D365 attachment of type "File", I get these errors:

 

Results. 'FileContents' is required when attaching a file

Results. validateWrite failed on data source 'DocuRefEntity (DocuRefEntity)'

 

Unfortunately, there is no documentation on this that I can find, and so I don't know how to properly format the Excel file to make this work.

I opened a case with Microsoft's LCS support (really "Tek Experts"), and so far they haven't been able to tell me how to make it work. Here are the steps they suggested:

Create a data export job

Add export entity: customer attachment

  • destination format file: excel
  • Importable fields only
  • Enable Staging

Enable "data package"

Run export job (click "Export Now")

Click "Download package" in export results page button bar at the top

Extract the package 

Add a folder named Resources

Add the file(s) to the Resources folder that you want to import as file type attachments

Edit the Excel file. 

Delete the existing entries, leaving the header row

Generate GUID using website: https://www.uuidgenerator.net/guidand put it to DocumentID column, with curly braces

Save the changes to the XLSX file

Compress all 3 files and the folder to a zip file

Their instructions stopped their, so I made some assumptions and tried these steps to import it...

Create an Import job.

Add file

  • Entity name: Customer attachments
  • Source data format: package
  • Upload and add

Click Import now


Unfortunately, those steps don't work for me.  I get the same error as above. 


Has anyone else used the "Customer attachments" (or similar) data entity to import File type attachments to D365?  If so, how did you get it to work?
Thanks in advance for any and all advice about this.

I have the same question (0)
  • ToddB Profile Picture
    on at

    Hi Daniel,

    As you are already working with support I will leave this here for the community to reply if anyone has done this previously.

  • Suggested answer
    Parag Chapre Profile Picture
    12,254 Most Valuable Professional on at

    Hi Daniel,

    I was searching for the same, but I found a blog post which explained this in detailed.

    How to import customer attachments – DynamicsPlus

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 > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 231 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 228 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans