Using UpdateListItems to update a list on another web..

May 30, 2014 at 4:16 PM
Edited May 30, 2014 at 4:36 PM
I absolutely enjoy working with these libraries and have gotten so much work done in short time... However, I need to check on something with the UpdateListItems function.

I've got two separate SP 2010 Web applications (2 different ContentDB's). One is for customer collaboration and the other is our internal workflow and DB. What I am attempting to do is on the internal we create some list entries to start some project and then we create the same entries on the customer collaboration site (reduced number of fields).

So on the custom new case dialog in the internal website I call UpdateListItems to create a record on the cases list on the other collab site.

<script type="text/javascript" src="//"></script>
<script type="text/javascript" src="//"></script>

<script language="javascript" type="text/javascript">

    operation: "UpdateListItems",
    webURL: "//", 
    async: false,
    batchCmd: "New",
    listName: "Cases",
    valuepairs: [["Title", valPr[0]], ["Participant", valPr[1]], ["Project", valPr[2]],["BusinessManager", valPr[3]]],
    debug: true,
    completefunc: function(xData, Status) {
   if (Status == "success" ) {
    //alert("completed Create Record");
When I run this all the variables are populated with the proper data, the status = "Error" and the ResponseText = "No Transport"

I there a problem with trying to update a list on another contentDB?
Or maybe there's another way to handle this that I havn't tried???
May 30, 2014 at 7:43 PM
I get that error when I run web service calls between domains without first enabling Cross-Origin Resource Sharing (CORS). Add the following line somewhere near the top of your code. It should work for the life of the page.
$.support.cors = true;
With CORS enabled, I'm able to run web service calls between domains and even between different versions of SharePoint (2007 & 2010), either direction.
Also, you're referencing jQuery 1.11. I'm not sure how extensively Marc has tested that. You may want to switch to jQuery 1.10 for now.

May 30, 2014 at 9:07 PM
Edited May 30, 2014 at 9:09 PM
Thank you, it works. I've been beating my head to the last hour on this one...

That is just too cool..... This works fantastic and Marc can assume it's tested in 1.11.1 too.
BTW I defined this in the global section, since this is a Dialog window it only lives for the time till I click save.

Thanks Geoff... :)
Jun 2, 2014 at 1:31 PM
Also see this thread:

I can't test with every version of jQuery, but I haven't heard about any issues to date with 1.11.x.