Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to sync files between 2 SharePoint sites. The 'origin' SharePoint is our internal SharePoint we all use. We have a subsite for each client. The second SharePoint is semi-public/accessible to our clients.

Whenever we put 'SyncToExtranet' to true in the document properties, a Workflow should upload/overwrite it in the external Sharepoint by using the SOAP of the external SharePoint.

Like this: Image

I'm using SharePoint Designer but am not getting anywhere. A little guidance would be nice.

share|improve this question
add comment

5 Answers 5

As mentioned, you will need to use either Visual Studio for this workflow scenario, or implement a Event Receiver in the document library that will fire whenever item is added or updated.

In both cases the program code would run after item has been added/updated and the context of the workflow/event receiver will contain the document in question (or at least a reference to it). So, as you can get hold of the document in the program code, you can just determine the location where you will need to upload it to, and use e.g., the Copy Web Service to upload the document.

One challenge may be authentication, as if you will upload the document using workflow or event receiver, the program code runs using a service account. Destination files will then have some service account as a "Creator".

share|improve this answer
    
Thanks a lot for your answer. I'll look into this. –  Bart De Vos Feb 17 '12 at 15:15
add comment

Why the code solutions? Use the native SP2010 document routing possibilities. Define an external Send to location on your source web app (in central admin), point it to the external site (web service url is something like http://destinationsiteurl/_vti_bin/OfficialFile.asmx), set the file action to either copy or move (depending on your needs).

Then, in your source site collection (or web), create a routing rule, that is bound to a content type, have it include the boolean field as a rule, and select the external send to location as the rule action.

In the destination site collection, you can then add rules that route the file inside that site to it's destination library, based on rules. If you don't files will be added to the dropoff library there, awaiting further action by a user)

  • Both sites need to have the document routing features enabled.
  • Content types need to be available in both sites.
share|improve this answer
add comment

You cant make advanced workflow scenarios in sharepoint designer, for this you need to use visual studio 2010

see the bottom of this site for examples http://technet.microsoft.com/en-us/sharepoint/ff819861

share|improve this answer
add comment

Here's a step-by-step post on using Copy Web Service.

share|improve this answer
add comment

You can easily keep the two SharePoint farms in sync using content deployment.You can also schedule it(hourly or daily) for incremental or full deployment.

If you want to trigger the job on demand (like SyncToExtranet = true), you can do it via code.

One thing to note about content deployment is that it deploys all content(or all new content if configured as incremental) and not just a single file. And that is the purpose of it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.