web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to replace the file or file stream for the uploaded files using the url in D365FO using x++?

(0) ShareShare
ReportReport
Posted on by 214
Hi All,

We have a requirement, where user will upload unadjusted bank statement (.TXT) and as a part of our customization, there are few modifications required in the file to make the file adjusted once it is uploaded by the user.

The custom code to make the file adjusted is already developed but somehow, I am not able to replace the uploaded file data with new data as I will have to replace file or file content during one process so that the system will consider adjusted file but NOT the one that user has uploaded.

So, Is there any way where we can replace the uploaded file with the new file or uploaded file steam with new steam so that the adjusted file will be considered for further process?
 
I want to replace the file or file stream that getDownloadUrl() method returns.
 
Standard class name: BankStatementImportBatch
 
Any suggestions...
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    236,316 Most Valuable Professional on at
    How to replace the file or file stream for the uploaded files using the url in D365FO using x++?
    If you want to modify the files already on upload (not inside BankStatementImportBatch.run()), then extending BankStatementFileTemporaryStorageStrategy class may be the best approach.
     
    For example, you could manipulate the stream already at the beginning of uploadFile().
  • Dhruv R Thakar Profile Picture
    214 on at
    How to replace the file or file stream for the uploaded files using the url in D365FO using x++?
    Hi Martin, do you have any sample code to manipulate the uploaded file?
  • Martin Dráb Profile Picture
    236,316 Most Valuable Professional on at
    How to replace the file or file stream for the uploaded files using the url in D365FO using x++?
    I don't, because I even don't know what you'd like to do there.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,157

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 674 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans