This project has moved and is read-only. For the latest updates, please go here.

UpdateListItems to create new items?

Nov 4, 2009 at 12:43 AM

Do you know if there is an existing way to create new list items?  I have used something similar with a different with a different javascripted based library which uses the UpdateListItems call to create new items.

Looking at the code on line 246

SOAPEnvelope.payload += "<updates><Batch OnError='Continue'><Method ID='1' Cmd='Update'>";

My javascript and jQuery knowledge is only basic (I am just a beginer) this looks like it's only updating existing items (leaving out the ID results in the default ID of 1 getting updated).

I made a quick change on my local copy to read,

SOAPEnvelope.payload += "<updates><Batch OnError='Continue'><Method ID='1' Cmd='"+ opt.mode +"'>";

Then added a mode: "Update" or "New" to the function call, which worked nicely.

Nov 4, 2009 at 2:01 AM


Take a look at this thread for more information on this and post back if you need more info.


Nov 6, 2009 at 12:04 AM

Thanks for the pointer and the library, it's proving amazingly useful.


Nov 6, 2009 at 12:08 AM

Excellent!  I'd love to hear what proves useful for you and if you have any issues.