.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Update a record in a SharePoint list using web services

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :SharePoint

Hi all,

I am trying to update one field in a record on a SharePoint list. I am using the code below to do this. The thing is it is tossing an error:

Unexpected end of file has occurred. The following elements are not closed: Method. Line 1, position 29.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: Method. Line 1, position 29.

Source Error:

Line 791:
Line 792:    /* Update the inspire field to exported*/
Line 793:    batchElement.InnerXml += "<Method ID='1' Cmd='Update'>";

Line 794:    batchElement.InnerXml += "<Field Name='ID'>6</Field>";
Line 795:    batchElement.InnerXml += "<Field Name='inpsire'>new</Field>";

As I understand; I create a method and then cmd update. I then give the ID of the record th

View Complete Post

More Related Resource Links

Concurrent update in sharepoint list item



How the concurrent for sharepoint list item are are handled.

if two or more users are working on same item. Then how sharepoint process multiple update request for particular list item.

infrastructure Update for Windows SharePoint Services 3.0 (KB951695).



i'm using sharepoint services 3 sp2 and sharepoint designer 2007

i want to know if i can use the infrastructure Update for Windows SharePoint Services 3.0 (KB951695).

the thing is my workflow does not start automaticaly and my dataview does not work when i insert a new item.

can this update fix these errors. a read this on a article but i was no quite shure

Update SharePoint List item using UpdateListItem web service with javascript

I'm using the Custom_AddListMenuItems function in a CEWP to add a menu item to each list item to Archive that item. This is achieved by updating a choice field in the item to 'Archived'. I'm trying to do this using the web service UpdateListItem web service to update the item using Javascript, but I can not find the correct code that updates the list item. I'm using this code:     var ctx=currentCtx;     var ciid=currentItemID;     var xmlHttp=null;     if (confirm("Are you sure you want to Archive this item?"))     {         var soapRequest = '<?xml version="1.0" encoding="utf-8"?>'+             '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+             '    <soap:Body>'+             '        <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+         

SharePoint 2010 Reporting Services report on sharepoint list rsExecutionNotFound

I cannot get SQL Reporting Services 2008 R2 to work with a datasource that is a sharepoint list.  Reporting services seems to work fine setup in SharePoint 2010 Integrated mode. When I try and run a report that is based on a sharepoint list, I immediatly get the following error: The report execution tp15sp4515l3seqqo4do3e45 has expired or cannot be found. (rsExecutionNotFound) This seems to be something I am doing wrong with the sharepoint configuration, I would guess.  I haven't tried a regular database query, but they used to work when reporting services was configured for native mode.  So I assume this is just a problem connecting to sharepoint 2010 lists, with the new SharePoint 2010 List connection type. Edit This has got to have something to do with a permission setting for the app pool account of sharepoint.  I read something once where it said you had to grant it permissions, but every guide I've found since then doesn't mention anything about it. This log entry is where the problem seems to be occuring, I just don't know what permissions to give TESTDOMAIN\spweb which is the app pool account. library!ReportServer_0-3!1bdc!09/01/2010-09:58:03:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database.  This may be due to a connection failure, tim

How to prevent automatic update from sharepoint list on Infopath 2007 form

Hi there, I've got an Infopath 2007 form on MOSS 2007. I have a custom list in sharepoint and the infopath form has a data connection to that list to receive data. Is there any way to prevent automatic update on the values in the form that is received from the list. I'd like the new form to have updated info received from the list. However, the old/existing forms that were created should have the data that were available at the time when the form was created. Let me know if this is not clear and I'll try to explain more. Thanks,Pman http://www.pmansLab.com/

Invalid data has been used to update the list item in sharepoint 2010.

I have created a custom list definition with one lookup field <      Field ID="{865CD714-7DF6-4F65-9DBC-5FE910B10BC5}" Name="CompanyName" DisplayName="Company Name" Group="Custom contents" Description="Select Company" Type="Lookup" ShowField="CompanyName" Required="FALSE" FieldRef="CompanyName" List="Lists/LookupListDefinition-ListInstance1" ReadOnly="FALSE"></Field>   <nativehr>0x80070057</nativehr><nativestack></nativestack>Invalid data has been used to update the list item. The field you are trying to update may be read only. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. My solution is perfectly get deployed on site. I can see the list instance created on site its also appears on quicklaunch. When i am trying to add the item into the custom list using UI then i am getting the input form correctly i can see the lookup values in dropdown list but when i click on save button then its give me an error as mention above. For debugging purpose i have created the event reciver class for list item adding event. In that i have check the column status and

Cannot update Extenal list from worflow in Sharepoint 2010

Hi, I try to update an external list from a step in worflow; I did in Sharpoint Designer. I did that: 1. I create a List and put one field from my external list 2. In the action I chose: Update list item 3. In the drop down list I chose: External List 4. In the find the list Item: I look for my ID in my external list and past this value for current Item. 5. I published this workflow 6. I ran this workflow in my list But when I running in my list and finish: This workflow don't upated my external list and write in the log: Error.  :( What can I do. The user have permision in my list and in my external list too for write and read (full control),

Update custom list of sharepoint using web service

I need update an colunm of list sharepoint using web services. The code used is: private void button1_Click(object sender, EventArgs e)         {             try             {                   WSLists.Lists listService = new Lists();                 listService.Credentials = new System.Net.NetworkCredential("Usuario1", "Password", "Dominio");                 System.Xml.XmlDocument doc = new System.Xml.XmlDocument();                 System.Xml.XmlNode ndListView = listService.GetListAndView("LIST_Test ", "");                 string strListID = ndListView.ChildNodes[0].Attributes["Name"].Value;                 string strViewID = ndListView.ChildNodes[1].Attributes["Name"].Value;         

update list text or date value via sharepoint designer using JAVA


Hi All,

Bit of a noob question - but tried all sorts and can't get this to work - also first time i've ever used sharepoint.

(I'm using sharepoint designer 2007) I have a form, on the form i select a type (drop box choice) and it hides or displays a related field, I want to auto populate the field when it displays, below is the java i have currently. 

Please advise how to populate (date field) with tommorows date, and also if it was a text field with the word "testdre"

<script type="text/javascript">
  function hideFieldsOnStart()
   //hide the control at start
   var control = getTagFromIdentifierAndTitle("input","TextField","Urgent Change Justifacation");
   //add an onchange event to the dropdown
   getTagFromIdentifierAndTitle("select","DropDownChoice","Change Type").onchange = function() {ChangeEvent()};
  function ChangeEvent()
   //get the dropdown

cascading drop down list in infopath forms services Using SharePoint Look up list from multiple Sh



Some one can help me, if possible screen shots.
Environment : MOSS 2007, InfoPath 2007

Best way to update a Sharepoint 2007 custom list schema after it has been deployed to production


What is the best way to update a Sharepoint 2007 custom list schema file (that is deployed using a feature) after the list has been deployed to production.


Scenario: We have custom list based on a custom list definition and template that we have deployed to production. Users have added items to this list and also added their own new columns to this list apart from what we originally included. Now I want to update this list schema (add another custom column). Whats the best way to achieve that?

Also, a related question is that if a new <field> entry is added to an already deployed schema file, will pushing the new schema file to the right place be enough or will a feature deactivation/activation also be required? I have noticed that some changes to schema files are picked up without the need to deactivate/activate the feature. But whats the general practice for scenarios like this?

Install August Cumulative Update (CU) - Windows SharePoint Services 3.0 (KB 2276474) and Office Shar


The KB2276474 returns that the expected product version is not installed on the server.
The KB2276472 installs without problems.

Windows 2008 R2 server, Microsoft Office Sharepoint 2007 SP2 June CU, KB 983311 - KB 983310

What might i be missing?

Edit: The installer returns the message in danish, and i have no language pack installed, and my OS is in english. Could this be what is wrong?

Item update in the sharepoint list using web service with javascript



I am using below code for web services with javascript


function CreateListItem(Title)



    var soap1 = createEnvelope(Title);


    var ws = new ActiveXObject("Microsoft.XMLHTTP");    

      if(ws == null) 

       return null;





    ws.setRequestHeader("Content-Type", "text/xml; charset=utf-8");            







  function createEnvelope(Title)


     var batch;

var xmldoc;    

var ListName = 'S

how to update sharepoint list item instead of creating a new one


hi guys,

i was working on a webform on asp.net, it has a list to save users information. the system has a "profile manager", it has user's loggin name. so i made a query to check if it already exists in the list, and then prepopulated the information on the form(in page load).

what i want is that if this item already exists, it can update the item. if it is not in the list, it will then create a new one.

i was searching around, and changed my code accordingly. but it always create a new item, even though all information is the same.

here is my pageload code:

public class TTCVIP : System.Web.UI.UserControl


  protected GenericWebPart webpart;

  StringBuilder _exceptionMsg;

  bool _hasException;

  #region member controls



  //rendering the page

  private void Page_Load(object sender, System.EventArgs e)



   SPSite mySite = SPControl.GetContextSite(Context);

   SPWeb myWeb = SPControl.GetContextWeb(Context);

   ServerContext context = ServerContext.GetContext(mySite);

   UserProfileManager myProfileManager = new UserProfileManager(context);

   string CurrentUser = Context.User.Identity.Name;

   UserProfile myProfile = myProfileManager.GetUserProfile(CurrentUser);         


   //check if list exist and create new list 



    if (!IsPostBack)



Update existing sharepoint list Problem



I ve a prob to updating existing sharepoint list's column on the basis of other field(id or somthing else), using visual studio.

I m updating but its adding a new row below at last in the list.

Please tell me the steps.


Thanks in advance !

Regards- Sharad

Consume SharePoint List in Excel Services


I found some older questions regarding this but they are all listed in the Pre-SharePoint 2010 forums. I wanted to know if there is anything I can do to more easily pull data from a SharePoint List (more specifically a set of related lists) into Excel Services such that data refresh is handled as well.


I found a couple topics that used UDF as solutions to this problem, but I am not sure if they will handle data refresh. These solutions are discussed in: http://social.msdn.microsoft.com/Forums/en-US/sharepointexcel/thread/79f5c968-b68f-4d53-bfe0-d57258cfed6c and http://social.msdn.microsoft.com/Forums/en-US/sharepointexcel/thread/16f9255d-cd06-4687-ab8e-68bd6210d0f8


I am hoping the 2010 version of Excel Services can handle this more simply, thanks!

Update Existing Sharepoint List's field Problem



This is about sharepoint sequential workflow using visual studio.

I ve a prob to updating existing sharepoint list's field on the basis of other field(id or somthing else), using visual studio.

I m updating sharepoint list but its adding a new row below at last in the sharepoint list.

i m having a UserID(lots of user's ID) field in the sharepoint list, on the basis of this userID i ve to update a perticular field corresponding to UserID.

Please tel me wat type of code i ve to mension.


Thanks in advance !

Regards- Sharad
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend