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

Checking if a file exists in Sharepoint.

(0) ShareShare
ReportReport
Posted on by 310
OK, here is one for the developers.
 
We have a custom Dexterity application that links to Dynamics GP via eConnect.
 
We have written a powershell script that we use to upload PDF and XLSX files from our file system to Sharepoint.
 
This script is called from the dexterity routine that generates the PDF file.
 
The issue we have is that sometimes, for whatever reason, the PDF file does not successfully load.
 
I currently do a File_Probe() on the file server to see if the PDF file exists.  If it does, I call the powershell script (converted to an exe) to upload to sharepoint.
 
I have the script logging the success or failure so I know why it is failing once or twice a day.
 
What I want to do is effectively do a File_Probe() on the Sharepoint URL/file to see if it exists and if it doesn't, rerun the process.  I will do this an an end of day scheduled routine within our Dexterity application.  
 
I am not sure of the best way to do this.  I know it can be done in Powershell, PowerAutomate, etc but I need it from within Dexterity so I can just rerun the existing upload routine.
 
Any help would be appreciated.
 
 
Mark
Categories:
I have the same question (0)
  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at
    Hi,
    Maybe we would be in a better place to assist if you explain what the whole process purpose is and why you had to write a separate Dexterity code to perform this ? do you print bulk documents out of GP ? or generate XLSX files from GP with SmartLists that you want put on a SharePoint site ? 
    Have you thought about producing those files in SSRS and ship them automatically to the right location on the network in SharePoint ? I've done this in the past and works very well.. SSRS natively generates PDF or XLSX files and can send them on scheduled times. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 586 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 311

#3
Diego Mancassola Profile Picture

Diego Mancassola 271

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans