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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
jalcadminAuthor 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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.