Skip to main content

I have some different edit from so I want start workflow after save specific edit from.

I use below code and eventually i get "success" ! but workflow does not start on specific item.

function StartAttachment(ItemID, ListName, SiteURL, WFName) {
var sr = '<?xml version="1.0" encoding="utf-8"?>'
+' <soap:Body>'
+'<StartWorkflowOnListItem xmlns="http://nintex.com">'
+'<itemId>95</itemId>'
+'<listName>IssueTracker</listName>'
+'<workflowName>Attachment WF</workflowName>'
+'<associationData></associationData>'
+'</StartWorkflowOnListItem>'
+'</soap:Body>'
+'</soap:Envelope>'
$.ajax({
url: SiteURL + "/_vti_bin/NintexWorkflow/Workflow.asmx",
beforeSend: function (xhr) {
xhr.setRequestHeader("SOAPAction", "http://nintex.com/StartWorkflowOnListItem");
//POINTN1]
//xhr.setRequestHeader ("Authorization", "Basic " + window.btoa("login:pass"));
},
type: "POST",
dataType: "xml",
data: sr,
success: function () {
alert("success");
},
contentType: "text/xml; charset=utf-8",
error: function (requestObject, error, errorThrown) {
alert(requestObject.status + " " + error + " " + errorThrown); }
});
}

how can I do that?

How about setting a field value when saving your specific form and have your workflow started conditionally when this field is updated with a specific value?


Hello,

You can also use a start condition on your workflow to start the workflow automatically on item modify.   

Thanks

Mike


I know this way! I want do that with JavaScript code in specific edit form.


thanks a lot, i do not want add field, I need call web service and start workflow directly.


Reply