Solved

How to add a button to start workflow in DispForm in WSS sharepoint?

Posted on 2011-09-22
2
1,239 Views
Last Modified: 2012-05-12
I want to add a custom button in the DispForm to run a specific workflow which similar if you click "Workflow" button from the FormToolBar, then select specific workflow, then click "Start" button.

Any advise?
Thank you.

workflow1.jpg
Workflow2.jpg
0
Comment
Question by:dickchan
2 Comments
 
LVL 14

Accepted Solution

by:
abhitrig earned 500 total points
ID: 36587313
1. Try creating a custom action for the list item for every workflow you need. Not exactly a button, but the feel will be similar. http://www.codestore.net/store.nsf/unid/BLOG-20100811-0741

2. Create a custom field and change the display logic so that it displays a button with the WF name. http://sharepointmagazine.net/articles/customizing-the-user-experience-of-sharepoint-custom-fields-deep-dive-part-5-of-6

3. Edit the page and create a html button that calls a Javascript function. The function can then call a Webservice to start your WF. http://weblogs.asp.net/jan/archive/2009/04/09/calling-the-sharepoint-web-services-with-jquery.aspx http://darrenjohnstone.net/2007/05/28/querying-a-sharepoint-list-with-javascript/

0
 

Author Comment

by:dickchan
ID: 36712368
I ceated a hyperlink at DispForm.

It will load a workflow initiate page as below.

http://servername/Workflows/SyncDel5a/SyncDel5a.aspx?List=2f891869-16d8-4730-a94b-af80bcb70e5d&ID=25&TemplateID={96db947d-615b-4be1-a356-e1edd6672ae1}&Source=http%3A%2F%2Frsweb%2FLists%2FRooma%2Fcalendara%2Easpx

But i still need to click "Start" Button to run the workflow, any idea can i run the workflow directly after click the hyperlink?

I am new to javascript, could you advise some sample code?
Thank you.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question