UpdateListItems with an External List

May 8, 2012 at 2:59 PM

I think this may be the first time I've *asked* a question here!

I'm trying to use UpdateListItems with an External List. The list is accessible to me as a user and I can add items manually.

When trying to create a new item with UpdatelistItems, I'm getting the error below. I'm wondering if this is due to it being an External List or if I'm missing something.



May 8, 2012 at 3:10 PM

Not saying it is SPServices in general, but can you try the same test writing out the full soap request? Just to rule out anything maybe.

I too had wondered if this would work. I know that SP through the UI handles the security model and wraps the query to the backend data, but I am not sure that it does this with web service calls. It would be nice to know though!

May 8, 2012 at 3:22 PM

I've looked at the SOAP request going to the server with the Developer Tools and it looks fine. I also took the call I was doing and used bascially the same code to write to a SharePointl ist just to make sure I didn't have some sort of dumb syntax error, and that worked.

What I'd love to hear is that someone has already done this so that I know it's worth pursuing.


May 8, 2012 at 3:23 PM

Just a thought Marc and maybe a possible addition to the library:


Does the External List have a GUID similar to the OOTB Lists/Libraries.  You may be able to use this method to get data instead.  Wish I was more familiar with BCS.  I've not been tasked to use it yet.




Jul 18, 2012 at 2:24 PM

Hi Marc,

I also tried to use UpdateListItems with external lists, to no avail (GetListItems does work). So I tried the other data access APIs. I summarized my findings are here:



Aug 3, 2012 at 5:03 PM

It is so interesting to me when I get to do new things and I tried to tackle this same problem to be sure that I could understand the issue. I first received the same error message that you got, but I got one step closer when I added the "ID" paramater to the batch command. I just used a zero as the ID and this at first looked promising. I also have a field in the external data called ID which should also have worked I thought. Also, it was harder to initially identify all the required fields and once I had those down I did run out of time to test it further for at least adding an item. However, when I try to edit an item I receive the "Cannot access a closed Stream" message. Everything I can find about that suggests that the web service is tied directly with the SQL database that sharepoint is using where the lists/libraries reside. That error is returned when the database server can't access the list because it does not exist as a true list in that database. It is odd the GetListItems should work though. So I tried to see if I could use the client side object model in ECMAScript (javascript) to do all of the CRUD ops in an external list and through trial and error, it worked! I have learned a lot in the process and will be writing a blog post on it soon. (The more prodding the faster the post!!). Just thought I would pass this along.