Move attachments from item to a network share in #SharePoint Designer

In a previous article I wrote about creating a custom SharePoint Designer workflow action. Once you can do this the sky is the limit.

This example use the same technique to create a custom workflow action that moves the attachments from an item to a network share (in my case I had to move them to a public webserver).

The custom workflow actions contains 3 parameters:

  • FileCopied: a boolean that indicated if the copy action succeeded
  • FileSharePath: the path of the network share (make sure that the user that initiates the workflow has access to this location)
  • the special __Activation parameter that contains information about the workflow, the web and the current item.

image

In the Execute method we put the following code:

image

Of course you have to create a .ACTIONS file and add an entry to web.config (as described in this article).

image