web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans