Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

WinApi::fileExists lock folder when from batch

(0) ShareShare
ReportReport
Posted on by 42
Hi,
I want to save pdf file to a remote folder in Axapta 4.0
I use in a batch WinApi::fileExists() method.
When checking for file Axapta freezes and the folder looks like being blocked (for example when I try to open it from explorer)
Only when I restart the whole remote machine it unlocks, when restart AXServer no change.
 
Any solution for this?
 
Ps. class where WinApi::fileExists() is set to server, but run from other class set to Called from.
Should I use new InteropPermission with WinApi::fileExists() method?
  • Martin Dráb Profile Picture
    231,723 Most Valuable Professional on at
    WinApi::fileExists lock folder when from batch
    I suspect (based on another discussion) that you have a huge amount of files in the folder and that you're connected to a network drive (which itself means that it won't be very fast). Is it the case?
     
    Regarding your last question: no, there is no need for InteropPermission in this case.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans