Start workflow OnClick event
- Adam Reyes
- Posts: 35
- Joined: Tue Mar 04, 2014
I created a form where I created a button on the Display Form that needs to start a workflow but I'm having trouble building a url that pulls in the item ID. What can I use in FormsDesigner or Javascript that will pull in the correct ID then launch the workflow? I'm currently using this:
window.open('https://www.somesite.com/_layouts/15/In ... x','_blank');
I attempted to use the following but could not get it to pull in the ID:
&ID={ID}
&ID=[ID]
&ID=('ID')
&ID={@ID}
window.open('https://www.somesite.com/_layouts/15/In ... x','_blank');
I attempted to use the following but could not get it to pull in the ID:
&ID={ID}
&ID=[ID]
&ID=('ID')
&ID={@ID}
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello Adam,
Please, try the following code:
Please, try the following code:
Code: Select all
window.open('https://www.somesite.com/_layouts/15/IniWrkflIP.aspx?List={cb84a83a-dd06-4190-9471-ddec67a0465c}&ID=' + [b]GetUrlKeyValue[/b]('ID') + '&ItemGuid={03607538-5743-46AE-A792-A453F0D1E3D8}&TemplateID={e6fa6347-030a-4403-a77f-44d18cb059de}&Source=https%3A%2F%2Fwww%2Esomesite%2Ecom%2FLists%2FDisputes%2FDisputes
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
There are a lot of samples on how to start a workflow via JavaScript:
https://ericgregorich.com/2014/10/01/20 ... avascript/
So, you only need to insert the correct code into OnClick property of the HyperLink control. Our support team can help you with the task. It will take 200 support minutes.
There are a lot of samples on how to start a workflow via JavaScript:
https://ericgregorich.com/2014/10/01/20 ... avascript/
So, you only need to insert the correct code into OnClick property of the HyperLink control. Our support team can help you with the task. It will take 200 support minutes.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 23 guests