Sharepoint Folder Error Trapping

I am working on a Sharepoint Integration that leverages SP's email functionality to create folders and email documents into document libraries.  Basically I have an application that autofires and email to the library with a record number as its subject line, thereby creating a folder in SP for that record.  The application then has a button that, when pressed, points to the url of the folder and opens the folder so that they can add documents to it.  The email process seems to work out fine except that SharePoint has a delay in creating the folder so that there is a minute or two that the folder may not exist.  That would also be fine except that when you open a document library using a url to a folder that doesn't exist, SharePoint points you to the document library's root rather than throwing an error message that I could trap.   This leaves a minute or two in which the user could upload to the root directory and not know it, and then not be able to find the document.  There is also the possibility that something could go wrong in the email process and SharePoint would not create the folder, in which case any user that tried to upload from that record would be putting their files in the root folder.  Does anyone know of any way that I could force SharePoint to throw an error when it is directed to an invalid folder ID, rather than redirecting to the root folder?

Thanks,
Hassab
jalcadminAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jalcadminConnect With a Mentor Author Commented:
MsShadow, I was attempting to avoid using the webservices, and without being able to do verify the vailidity of a URL there was no way to do that.  Anyhoo, I was able to resolve this by basically using via a trigger on the sp database.  
0
 
jalcadminAuthor Commented:
Sorry, need to clarify.  I have set up a web part page through which the document library is viewed.  The web part page removes headers and side bars using content editor web part.  When I go to an invalid folder in SP using the document library standard view I do get an error, however, via a web part page there is no error, just a view as if the folder was indeed valid.

Thanks,
Hassab
0
 
MsShadowCommented:
You could check if the folder exists before you show the link.
0
All Courses

From novice to tech pro — start learning today.