Answered by:
How to create list ItemURL in Client Object Model to start Workflow?

Question
-
I am trying to start Workflow from Java Script. I found a lot of examples how to do this by using jQuery SPServices http://spservices.codeplex.com/wikipage?title=StartWorkflow but I did not find any explanation what is the ItemURL. Does anybody have an idea how to create ItemURL?
function StartWorkflow(ItemURL, ItemID) { var loadingImage = ‘Loader’ + ItemID; var workflowDiv = ‘WorkflowDiv’ + ItemID; //Show our loading image document.getElementById(loadingImage).style.visibility = ‘visible’; $().SPServices({ operation: "StartWorkflow", item: ItemURL, templateId: "{04ee1c93-f6b7-49b3-a79c-fa3142ecd688}", workflowParameters: "<root />", completefunc: function() { document.getElementById(workflowDiv).innerHTML = ‘Workflow Started’; } }); }
- Edited by Oleg_Petrychenko Thursday, January 19, 2012 7:28 PM Added more details
Thursday, January 19, 2012 6:00 PM
Answers
-
This is the answer:
Happy Sharepointing... Regards SPTECH07- Marked as answer by Oleg_Petrychenko Thursday, January 19, 2012 10:01 PM
Thursday, January 19, 2012 7:42 PM
All replies
-
This is the answer:
Happy Sharepointing... Regards SPTECH07- Marked as answer by Oleg_Petrychenko Thursday, January 19, 2012 10:01 PM
Thursday, January 19, 2012 7:42 PM -
To be more specific, in this article you will find that the list item id is retrieved by using Xslt code in the dataview web part :
here is the code :
<xsl:attribute name=”onclick”>
<xsl:text>javascript:StartWorkflow(‘</xsl:text>
<xsl:value-of select=”@EncodedAbsUrl” disable-output-escaping=”yes”/>
<xsl:text>’,'</xsl:text>
<xsl:value-of select=”@ID” disable-output-escaping=”yes”/>
<xsl:text>’);</xsl:text>
</xsl:attribute>
Serge Luca; SharePoint MVP ; blog: http://sergeluca.wordpress.com/ Devoteam Belgium. http://twitter.com/sergelucaThursday, January 19, 2012 9:10 PM -
The right format: http://servername/sites/its/Lists/Change%20Request/2_.000 where 2 is Item ID.
OlegThursday, January 19, 2012 10:03 PM -
Does anyone have the right format for a Document/Form library?
Do I just call the item url?
Tuesday, July 24, 2012 2:09 PM -
No information is available shared
Kindle share the solution with detail about item, template it, URL
Wednesday, July 29, 2020 5:52 PM -
if you able to solved this issue kindly share the detail explanation
No information is available shared
Kindle share the solution with detail about item, template it, URL
Wednesday, July 29, 2020 5:53 PM