Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Unblock file before sending it to user.

(0) ShareShare
ReportReport
Posted on by 55

Hello, 

I have the following code to send the file to user. 
File::SendFileToUser(TmpFile.getStream(), #fileName);

It shows on the file property it's blocked as the screen shot below and the user need to unblock the file so it's needed a user action how I can unblock the file before sending it to the user so the user doesn't need to unlock it manually.


  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,996 Super User 2025 Season 1 on at
    RE: Unblock file before sending it to user.

    Hi Yusefsuli,

    The blocking of files is not managed by coding, This is done by the Attachment Manager in Windows when files are being downloaded. There is nothing you can do from x++ here.

    You can learn more on e.g. this blog: How to Stop Windows 10 From Blocking Your Downloaded Files (makeuseof.com)

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,996 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,853 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans