Skip to main content

Hi guys I need a little guidence with a process I am developing.


 The process involves uploading documents from a file system to a Sharepoint document library. The Documents are saved into to the file system folder automatically and these are then to be uploaded to a sharepoint library - this bit is straight forward.


However a couple of questions


a) how can I delete the document from the file system after a successful upload.


b) how would I handle errors such as Invalid Characters in the filename (sharepoint doesn't support the same as widnows eg. &) or a file size larger than the max allowed.


I've created the basic process in VS2005 using the Sharepoint Documents Event Wizard


Also is it possible to recreate a folder tree if one exists and place the documents in the respective folder ?


Thanks in advance


David


MOSS2007, K2 BlackPearl


 


 

Hi David.


for both (a) and (b) you'll have to drop to code.  you can do this in a server event added after (for ) and before (for ) the SharePoint Document event or in the code behind the SharePoint Document event itself.


if this is something you'll be doing often, you can modify the Extender for the SharePoint Document event wizard to always give you this capability, or create your own Event Wizards to do this kind of cleanup for you.


you will find some tutorials on the underground here to help with creating your own wizards here: http://k2underground.com/files/folders/technical_product_documents/entry21896.aspx


hope that helps.


hi,
i am learning about Sharepoint documents event. I created a simple process with sharepoint documents event to upload file to shared documents library of a sharepoint site, and then created a website with only a button. in the event that fires when i click on the button, i create a new process instance, but nothing added to library. In k2 workspace i see the manange process instance, it show a error: Process Instance is in error state.

I see that you created a process with sharepoint documents event. Can you share your experience with me?

 


Reply