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 :
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...
  • Suggested answer
    Martin Dráb Profile Picture
    241,467 Most Valuable Professional on at
    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
    Hi Martin, do you have any sample code to manipulate the uploaded file?
  • Martin Dráb Profile Picture
    241,467 Most Valuable Professional on at
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 347 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans