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

Using SP 2013.

What I am trying to accomplish:

User creates a document in Doc Lib A. Once they have finished working on that document they press a ribbon button and the document is copied into Doc Lib B for storage. Once the document is in Doc Lib B there are a few workflows that will automatically start (send an email, etc).

Question:

The ribbon button is working as expected. Items are copied from A to B fine. The issue is that the workflows do not automatically start once the item is in Doc Lib B. The workflows DO work for new items created/changed directly in Doc Lib B...but wont start for items copied from another Doc Lib.

Ive tried creating a separate column that I could change once the item is copied which would then trigger the workflow...but I can only seem to get it to apply to the item before it is copied.

Is there any way to automatically start workflows on items after they have been copied? I am really trying to avoid having the end-user start it themselves.

Thanks!

* Edit: Update- I was able to set up a "Send To" link to move the docs and all workflows applied correctly. Looks like that will be a band-aid until I can figure out a better solution.

share|improve this question
    
How exactly your custom ribbon button copies document? Can U start WF programmatically on the ribbon button clicked, right after the copy process done? –  dbardakov Jun 27 '13 at 19:20
    
Its a simple ribbon button with an attached WF. It copies Document in Current Item to doc lib B. It then Deletes Item in Current Item. Then it ends the WF. That part works fine it seems. The document gets copied and the original is deleted. A better question might be how to get the new version of the item into the WF. Using Current Item only refers to the original doc in lib A. There doesnt seem to be a way to get the new doc in lib B. –  Dana K Jun 27 '13 at 19:38

2 Answers 2

You should be able to have the workflow start on item creation. Because I use the copy item action in my workflow to copy from list a to list b and listb has a workflow that starts when the item is created. Check you workflow settings in SPDesigner.There is a flag that does this.

enter image description here

share|improve this answer
    
I actually do have the workflows set as such. They work fine for new items created within doc lib B....its when I copy a item from doc lib a to doc lib B that the workflows do not initialize in doc lib b for the copied item. –  Dana K Jun 27 '13 at 19:31

Maybe it's related to the issue i've seen before with the content organizer not firing workflows: http://blog.ozippy.com/2010/06/starting-workflow-when-content.html

Do you see any errors in the ULS logs like the following?

Declarative workflows cannot automatically start if the triggering action was performed by System Account. Canceling workflow auto-start.

share|improve this answer
    
Interesting...I did have that turned on. Turning it off didnt seem to resolve the issue though. Unfortunately Im using SP Online so I dont have access to the ULS logs and I havent setup anything to capture them yet. –  Dana K Jun 27 '13 at 20:15
    
But I am wondering if your code is moving the file under the system account and thus the workflow on the final destination isn't starting because the system account is doing the action. –  Steve Lineberry Jun 27 '13 at 20:31

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.