This project has moved. For the latest updates, please go here.

SpServices Starting a Workflow - Is ItemURL and ID necessary

Nov 21, 2013 at 11:04 AM
Hello -

Question on SPServices and StartWorkflow .... Is it required to have an itemURL and itemID (forgive casing on parms) ?

I have a manual workflow on a list that has one initiation parmeter that is a key to use for finding and updating a record within the list (Update List Item).

The workflow does not have to run against a specific ID as the workflow will use the key value of the init param ...

Is it possible to leave the itemURL and itemID out of StartWorkflow?

I suppose I could feed in any ID ... but would prefer not to ...

Nov 21, 2013 at 6:53 PM

The operation's requirements are determined by the underlying Web Services, i.e., Microsoft. You can try it, but as I remember those parameters are required.

Nov 22, 2013 at 6:58 PM
Thank you for the feedback Marc ...

Follow up question if I may ...

From the results in the list, I see that I am executing the workflow against the ID (15) used for the "item" .. however .. I keep receiving back "Exception of Type ... was thrown" and an error in SP for the workflow result in the view ...

There are two init params on the workflow ... One has a default value .. the other I pass in as a key ...

Have you seen teh Exception of Type error before?

var key = "Jeff";

    alert ("key value = " + key);

var wfParms = "<Data><p_serialization>" + key + "</p_serialization></Data>"
    alert("wfParms = " + wfParms);
// Invoke workflow for random Item ID ... passing in the parm
async: true,
templateId: "{e718f487-1523-4666-908f-1fe663a8c25c}",
workflowParameters: wfParms,
completefunc: function(xData, Status) {

Nov 27, 2013 at 5:01 PM