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

In sharepoint 2010, is it possible to attach a workflow to a particular web part so that it is run wherever that web part is inserted within your site.

For instance, I will be developing a large number of different pages to host videos (embedded from various sources including youtube and screencast). Because the videos will be hosted in external locations I will need to include a "report broken link" button, though I am reluctant to insert the image and turn it into a hyperlink on every one of the pages. So would it be possible to create this button in a web part and attach a workflow (say, to email me when it is clicked) to it so that all I have to do is insert the web part on each page

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

I would suggest rather go for a feedback/comments list (e.g. Top-Level site per site collection), and use either DVWP to enable users to submit feedback, or via a CEWP you could easily rely on ECMAScript in SharePoint 2010 to insert items at a button click (http://msdn.microsoft.com/en-us/library/hh185011.aspx).

In the 2nd step you could easily attach an email workflow made with SharePoint Designer which would drop a mail everytime you have a new entry in the list (http://office.microsoft.com/en-us/sharepoint-designer-help/send-e-mail-in-a-workflow-HA010239042.aspx).

This way you decouple the 2, and you could use the list for tracking and other scenarios.

share|improve this answer
    
Ahh that could work. I'll give it a go, thanks. –  Charles Baker Aug 10 '12 at 10:05
add comment

Would it be ok to instead of attaching a workflow to the web part to actually make the web part start a workflow? To me that sounds like a better idea. And you could make a list that the Web Part create on deployment, where you can configure what workflow it should start when activated.

share|improve this answer
    
This would be difficult to re-use though would it not? Not all the videos are within one site but right across a site collection. I have been unable to transfer things, via workflow, between sites before. I like your idea, though it would still mean creating lists within every site, in which case I may as well write the link. Please correct me if I have mis-understood. –  Charles Baker Aug 10 '12 at 8:34
    
I don't think i understand. You don't want to create a button or a link to report a broken link. So i would like to sort out what are you doing? How are the users going to report broken links? –  Robban1980 Aug 10 '12 at 8:53
    
I want to create a button, but I only want to create it once. So instead of having to insert the picture, select it, add a hyperlink etc. on every page; I'd like to do it once, in a web part. I suppose I could have it linked to an empty page hosting the workflow to send the email and use javascript to redirect them back... –  Charles Baker Aug 10 '12 at 10:03
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.