I’m fairly new to developing and I have a custom form that I made using SharePoint designer 2010 – I need to start my workflow on the click of the button, but I’m not using a site based workflow, so my code for the start button doesn’t work. My alternative is to have onclick set fields value (I have a hidden text field called start workflow) to yes.
For now this is what I have
<input name="StartWorkflow" type="button" value="Start Workflow" onclick=””/>
This is what I’ve found – but I don’t believe its correct to go in my onclick event.
I’m finding information relative to things outside of SharePoint so it’s confusing to put two and two together – I did find this information
var siteUrl = '/sites/MySiteCollection'; function updateListItem() { var clientContext = new SP.ClientContext(siteUrl); var oList = clientContext.get_web().get_lists().getByTitle('Announcements'); this.oListItem = oList.getItemById(3); oListItem.set_item('Title', 'My Updated Title'); oListItem.update(); clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); } function onQuerySucceeded() { alert('Item updated!'); } function onQueryFailed(sender, args) { alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace()); }
Also does anyone know how to create a onclick= redirect to..”www..etc”