In scenarios where I needed to have the ability to start a workflow via a hyperlink, I daisy-chained 2 functions, GetTemplatesForItem and StartWorkflow. GetTemplatesForItem gives you the proper GUID of the workflow you wish to start and then you pass that data along into the StartWorkflow function. In the second link, note the proper format the URL needs to be in.
So to trigger it on my hyperlink click, I'd just pass the ID of the item into my function, build the proper URL, find the workflow GUID, then pass the GUID and item URL into the start workflow function.
You can do this all in jQuery too, no need to use the client object model.
So to trigger it on my hyperlink click, I'd just pass the ID of the item into my function, build the proper URL, find the workflow GUID, then pass the GUID and item URL into the start workflow function.
You can do this all in jQuery too, no need to use the client object model.