Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:35:57+00:00 2026-06-18T09:35:57+00:00

First of all, what I am using: SharePoint 2007 JavaScript CAML Query Standard webservice

  • 0

First of all, what I am using:

  • SharePoint 2007
  • JavaScript
  • CAML Query
  • Standard webservice (_vti_bin/lists.asmx)

I am selecting one or more items from a list, depending on some condition. I get the items, and perform another condition on them. If the condition is met, I want to bump the item, meaning: change the ‘Modified’ column to the current date/time but no values should be changed.

Is this possible? If so, how can this be done?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:35:58+00:00Added an answer on June 18, 2026 at 9:35 am

    I already had to do the same thing. Although I’m not being able to find the code, I found the post that helped me that time. It’s written in C# but is easily adaptable to javascript:

    public void Test()
            {
                string webUrl = "http://myserver";
                string listName = "docs";
                Lists.ListsSoapClient listsClient = this.GetListsClient(webUrl);
    
                // 1st a call to Lists.GetList - we need the list's version - it is returned in the Version attribute
                XElement listData = XElement.Parse(listsClient.GetList(listName).OuterXml);
                string listID = listData.Attribute("ID").Value;
                string version = listData.Attribute("Version").Value;
                // in the updateFields parameter of Lists.UpdateList the full schema of the fields should be provided
                string updateFields = @"<Fields>
       <Method ID='1'>
          <Field ID='{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}' ColName='tp_Modified' RowOrdinal='0' ReadOnly='FALSE' Type='DateTime' Name='Modified' DisplayName='Modified' StorageTZ='TRUE' SourceID='http://schemas.microsoft.com/sharepoint/v3' StaticName='Modified' FromBaseType='TRUE' Version='4' ShowInNewForm='FALSE' ShowInEditForm='FALSE' />
       </Method>
       <Method ID='2'>
          <Field ID='{8c06beca-0777-48f7-91c7-6da68bc07b69}' ColName='tp_Created' RowOrdinal='0' ReadOnly='FALSE' Type='DateTime' Name='Created' DisplayName='Created' StorageTZ='TRUE' SourceID='http://schemas.microsoft.com/sharepoint/v3' StaticName='Created' FromBaseType='TRUE' Version='4' ShowInNewForm='FALSE' ShowInEditForm='FALSE' />
       </Method>
    </Fields>";
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(updateFields);
                // Lists.UpdateList: set fields to not read-only
                XElement result = XElement.Parse(listsClient.UpdateList(listID, null, null, doc.DocumentElement, null, version).OuterXml);
                // get updated version from the result XML - for the second call of Lists.UpdateList
                version = result.Elements().Where(el => el.Name.LocalName == "ListProperties").First().Attribute("Version").Value;
    
                // prepare the XML for the list item update
                string updateDates = @"<Batch OnError='Continue'>
      <Method ID='M0' Cmd='Update'>
        <Field Name='ID'>1</Field>
        <Field Name='FileRef'>/docs/zt.txt</Field>
        <Field Name='Modified'>2010-04-04T22:17:00Z</Field>
        <Field Name='Created'>2010-01-01T00:05:00Z</Field>
      </Method>
    </Batch>";
    
                doc.LoadXml(updateDates);
                // Lists.UpdateListItems: update Created & Modified
                result = XElement.Parse(listsClient.UpdateListItems(listID, doc.DocumentElement).OuterXml);
    
                // revert the fields' schema
                updateFields = updateFields.Replace("ReadOnly='FALSE'", "ReadOnly='TRUE'");
                doc.LoadXml(updateFields);
                // Lists.UpdateList: set fields back to read-only
                result = XElement.Parse(listsClient.UpdateList(listID, null, null, doc.DocumentElement, null, version).OuterXml);
            }
    

    Basically we have to set the read-only property of the field as false before we try to update it and, after the update, set that property back to true.

    Source:
    http://stefan-stanev-sharepoint-blog.blogspot.com.br/2010/04/updating-read-only-fields-with-lists.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, I'm using Fluent NHibernate with LinqToNHibernate. I've got a query to
first of all I'm using MySql. I have to create a advance search field
First of all, I'm using Visual Studio 2010 (Visual C#) and ASP.NET. I'm working
First of all, I'm using Windows, just to make that clear. I am using
First of all, i'm using the function below to read data from a pdf
First of all: I'm at Scala 2.8 I have a slight issue while using
First of all, before I begin, I am using VC++ 2008 professional, running an
I've been creating an iPhone App using Core Data. First of all, does it
I'm using a singleton class to save all my settings info. It's first utilized
I'm using opengl and trying to create a first person camera. All examples use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.