How to Start a SharePoint Workflow From JavaScript
Microsoft Sharepoint allows developers and administrators to customize the server software interface. Sharepoint provides a company with internal file sharing and organizational features for each company department. Use the XSL change control interface to add a JavaScript method that opens the Sharepoint Workflow with the click of a button.
Instructions
-
-
1
Open the Sharepoint editor and open the page you want to edit. Highlight the link or button you want to use to open the workflow chart. Open the "Content Editor."
-
2
Double-click the XL document to edit. Add the following line of code to link an "onClick" event to the link or button:
<xsl:attribute name=”open”>
<xsl:text>Workflow Button</xsl:text>
<xsl:attribute name=”onclick”> -
-
3
Add the XSL JavaScript code to open the workflow:
<xsl:text>javascript:StartWorkflow(‘myworkflow');</xsl:text>
Change the "myworkflow" ID to the name of your own Workflow form.
-
1