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)

How to copy and Inject data in to an attachment in AX7?

(0) ShareShare
ReportReport
Posted on by 120

Hi All,

I have a requirement where doccument is attached to the BOM version of the product  to be able to retrieve and copy it to an workorder i.e., This document should be copied as is to the current work order while copying I neeed to inject data into attachment and add that attachment to the workorder.

So, How to copy file from Azure blod to temporary blob and add data in to an attachement in AX 7

*This post is locked for comments

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

    Hi Shetha,

    I cannot provide you the answer, but can you explain in detail what type of attachment it is and what data needs to be inserted at what point?

  • Suggested answer
    Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    DocumentManagement class contains methods to get attachments in several ways (so you can choose which one is the best for you). Consider DocumentManagement::getAttachmentStream(), for example.

  • Shwetha Sanjeev Profile Picture
    120 on at

    Hi Andre,

    The attachment type is an excel template and when an workorder is created it needs to check for an active BOM for attachment file then if attachment exists then it will copy the attachment from BOM to workorder at that time it should insert the production id inside the particular column of the excel file.

    Thanks,

    Shwetha

  • Shwetha Sanjeev Profile Picture
    120 on at

    Thanks Martin for the reply.

    Even I am checking the DocumentManagement class. I got the url where the file is located in azure blob. Now I need to download the file without displaying file on UI and add production order number inside the excel and attach back to workorder.

    Can you suggest any way?

  • Martin Dráb Profile Picture
    237,882 Most Valuable Professional on at

    What exactly is the problem? I already told you how to access the content, so maybe now you don't know how to edit it. Or is your problem somewhere else?

  • Shwetha Sanjeev Profile Picture
    120 on at

    Hi Martin,

    There was an issue with file read and I resolved it.

    I have completed this requirement.

    Thanks,

    Shwetha

  • Ansar Basha Profile Picture
    1,584 on at

    Hi Shweta,

    I have the similar requirement to read file from blob storage and to download the file without prompting user for download, make changes and then attach the file.

    Could you pls. share us the solution how you resolved it,

    Thanks & Regards,

    Ansar Basha.S

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