Skip to main content

Notifications

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
    Martin Dráb 230,848 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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans