jquery - Cannot write more than two fields, using SPServices UpdateListItems -
jquery - Cannot write more than two fields, using SPServices UpdateListItems -
i'm creating list items in sharepoint (moss) list programmatically. i've been successful several different techniques, long limit number of fields two. need provide 76 field values, actually. trying spservices updatelistitems method. latest versions of jquery (1.7.1) , spservices (0.7.0).
my first approach utilize valuepairs option. have 2 arrays can utilize feed this. worked fine 2 values. tried statically filling variables , using those. same result. switched caml batch method. same result.
the finish function status "success." nil gets written list.
var batch = "<batch onerror='continue'><method id='1' cmd='new'>"; batch += "<field name='" + vartitle + "'>" + vartitle_val + "</field>"; batch += "<field name='" + varformid + "'>" + varformid_val + "</field>"; batch += "<field name='" + varee1 + "'>hi!</field>"; batch += "<field name='" + varee2 + "'>there</field>"; batch += "<field name='" + varee3 + "'>how</field>"; batch += "<field name='" + varee4 + "'>are</field>"; batch += "</method></batch>"; $().spservices({ operation: "updatelistitems", batchcmd: "new", listname: "crmsaccessrequest", // valuepairs: [[arfields[0],arvalues[0]],[arfields[1],arvalues[1]],[arfields [2],arvalues[2]]], //fails more 2 fields // valuepairs: [[vartitle,vartitle_val],[varformid,arvalues[1]],[varee1,varee1_val],[varee2,varee2_val]], // ditto updates: batch, completefunc: function(xdata, status) { alert("status of write attempt: " + status); } }); //spservices any suggestions?
the "success" getting tells there successful transaction. need @ returned xml see issues there might be.
the easiest way: alert(xdata.responsetext);
my guess 1 or more of field names incorrect. it's hard tell since using variables column names.
jquery sharepoint
Comments
Post a Comment