Questions tagged [updatelistitems]

A method of the Lists class that adds, deletes, or updates the specified items in a list on the current site.

Filter by
Sorted by
Tagged with
15
votes
3answers
11k views

AllowUnsafeUpdates vs SPSecurity.RunWithElevatedPrivileges

When is the best time to web.AllowUnsafeUpdates vs SPSecurity.RunWithElevatedPrivileges? Specifically when dealing with updating an item in a list or updating the list itself. Is it safest to use ...
10
votes
2answers
857 views

Is it possible to create a “Link to a Document” in a Document Library using a CAML Batch Command with UpdateListItems?

I have a Document Library in WSS 3 which has the "Link to a Document" content type enabled, and I want to use a batch command (via lists.asmx updatelistitems) to create a series of links. Here is the ...
7
votes
1answer
2k views

ItemUpdated event handler runs four times

I have a list in the rootweb, and a list in a subweb. I want to update/add when something changes in an item in the subweb. This method is invoked in an ItemUpdated event receiver. The problem is that ...
6
votes
2answers
3k views

SPListItem.SystemUpdate updates SPListItem.File.ModifiedBy

As can be seen from the debug image when I call SystemUpdate(false) of a SPItem, that SPItem's File object's ModifiedBy attribute changes to "SHAREPOINT\system". Sorry, it's a bit weird way to present ...
5
votes
3answers
21k views

How to update multiple items in sharepoint list online using javascript

I want to update 4 items in the same time in my SharePoint custom list using JavaScript. I am using a CAML query to get the item witch I want to update. Can anybody please help me and write a function ...
5
votes
1answer
8k views

Javascript : How to handle version conflict errors when using javascript COM?

so I use quite a bit of the javascript client object model for CRUD operations to lists from custom pages (inputs) and I have found that I get version conflict errors on saves from time to time....its ...
5
votes
1answer
3k views

Client Object Model - Update Document Library Metadata - Lookup Field with no required value

I am attempting to update metadata for documents in a document library (or List) using the client object model. I have whittled down a number of the error messages I was getting and now I am hitting ...
4
votes
2answers
33k views

Fetch list item properties using Powershell

I have document library. I want to replace some document properties using powershell. There are multiple properties associated with each document. First I'll need to check for all documents if that ...
4
votes
1answer
6k views

Update Created, Created By, Modified, Modified By using CSOM

How to update Created, Created By, Modified and Modified By in list items using CSOM?
4
votes
4answers
2k views

How to update the name of an attachment from a list item (if possible, with SPServices)?

Like the title says, I'd like to know how to update the name of an attachment from a list item. The document name.I've figured out how to get the attachment from a list item (see code below), on the ...
4
votes
1answer
2k views

Update readonly field using REST API

I am trying to update a list item using Rest API. Following is my code. It works and it updates all fields except "RichMessage" which is a Note field with RichText="TRUE" and readonly. I have tested ...
4
votes
3answers
2k views

Is there a way to start a SharePoint workflow from VBA code?

I created a tool in Excel VBA that generates a custom report from the data I pulled from a SharePoint list via Excel VBA code. What I want to do is change/update the "Status" field for items within ...
4
votes
1answer
1k views

Add document link to list item from a SharePoint workflow

I have a list workflow that creates a new document in a different library. This list has a column that will be used to save a URL with a link to the new document that will be created within the ...
4
votes
3answers
4k views

Adding a new item to a Document Library Using JSOM

I need to add a new item in a document library using JSOM. The document library also possesses custom columns. I am able to upload file but unable to get proper method to add the custom column values ...
3
votes
1answer
21k views

Updating Sharepoint List items

I got a custom Sharepoint list which has the following list items Hostname - IP - OS - CPUs - RAM - Disk Server 1.1.1.1 Server 2003 3 8 Disk C: 20gb If i then ...
3
votes
4answers
6k views

Remote Access to SharePoint Lists with PowerShell

I have a PowerShell script that pulls data from a database. I need to push this data to a SharePoint list on a different server. Would you have tutorial or examples that show how to do this (...
3
votes
1answer
99 views

Pass file name having space to update operation using REST API

I am using on premise SharePoint server 2016.I am using rest api to update a list.I have a list having space in it's name so while passing this name it causes problem.Is it possible to pass file name ...
3
votes
3answers
3k views

Do I need to do an update after set permissions on a listitem in the ItemAdded event receiver?

I have an event receiver on itemAdded. I set some permissions like below. SPRoleAssignment role = new SPRoleAssignment(spPrincipal); role.RoleDefinitionBindings.Add(web.RoleDefinitions.GetByType(...
3
votes
2answers
154 views

Update listitem in document library without using eventreceivers

How to update a listitems say status column in my document library from Pending to Approved without using event receivers or C#? If I use SPServices , it needs to be added as content editor web part ...
3
votes
3answers
13k views

Edit multiple list items in one shot?

I have a list that contains many items. I'd like to give my users the ability to select 10-20 items by "checking" them and then edit them all at once. Certain fields (item name, id, etc.) are item-...
3
votes
1answer
3k views

Microsoft.SharePoint.SPException: Save Conflict. On List.Update()

I have a site collection that has ~600 sub-sites. Each sub-site has a sub-site, as well, making a total of ~1200 sites. I am iterating through each site and updating (resetting) a list. This is ...
3
votes
1answer
6k views

2013 - Update Item - Path and Name - Fails

I have 2 libraries both published from an identical InfoPath 2013 form. I am trying to move items from Library A to Library B with a simple workflow: Update Item in Current Item With: Field set to ...
3
votes
1answer
364 views

SharePoint 2010 JavaScript CSOM- Updating list item by id - Anonymous user - Access denied

I am using SharePoint 2010 JavaScript Client Side Object Model to create and update list items on a SharePoint Survey list. In my use case users are anonymous . New items are created properly (...
3
votes
1answer
39 views

How to get current time in SharePoint designer 2013

It seems everytime I use "today" I get the current date but always at 12:00 PM
2
votes
5answers
277 views

SP 2010: JSOM function not working on page load

I am running a function on page load to update list item. Here's my complete code - jQuery(document).ready(function(){ updatePageViewCount(); }); function updatePageViewCount() { var ...
2
votes
4answers
4k views

How to update calculated column on a daily basis without admin rights?

I am running SharePoint 2013 and have a column that is supposed to determine whether or not each phase of a project is late. I am using the NOW() fucntion, which, of course, does not update ...
2
votes
2answers
77 views

Column validation for past dates

Looking at implementing column or list validation for a date field to stop them from entering past dates The validation should do the following Validate only there is a value in the column Validate ...
2
votes
1answer
2k views

Do event receivers fire when list items are added or updated using REST or CSOM

I want to know if an event reciever fires when a list item is added or updated using REST or CSOM. Can anyone help me with this and give me a correct direction and an example so that I can get my ...
2
votes
2answers
8k views

SharePoint 2013 Workflow - Update List Item Based on Two Columns

I'm not sure if this is possible. I would like to have a SharePoint 2013 workflow update a list item in another list only if: column A contains 'x' and column B contains 'y'. I know I am able to ...
2
votes
3answers
5k views

How to modify Author field of ListItem

I am building a migration tool that is migrating items from an XML schema to SharePoint list fields. Everything is working fine except when it comes to the migration of Created By fields. I need to ...
2
votes
2answers
4k views

Unable to update item using powershell when event reciever is enabled

I have a powershell script that I am using to update some list items programatically. It seems to work as I expected when I disable the event reciever that is associated with the list however when I ...
2
votes
1answer
1k views

Is Sharepoint List item update using REST API return updated data

I am trying to update custom list item using REST API. I was successfully updated item but in response of request i am not getting updated record. I want to store updated etag but I am getting 204 ...
2
votes
2answers
833 views

Why unable to update columns in listitem using CSOM?

I am trying to perform a basic operation,updating a column in a list item of a list.Following is the code , List oList = clientContext.Web.Lists.GetByTitle("HomePageTab"); ListItem oListItem ...
2
votes
2answers
195 views

moving list items from wss 3.0 to foundation 2010 using lists.asmx

I'm trying to use Lists.UpdateListItems to move items from a list in WSS 3.0 to a list in SharePoint Foundation 2010. The original list contains several items. The target list does not contain any ...
2
votes
1answer
6k views

Powershell - Update column with managed-metadata

I have used following PS script to update a manage metadata column. Not sure how to go by updating a managed-metadata column. I know I need to only populate with "10;#Wholesale Agreement" in ...
2
votes
1answer
254 views

updateListitems issue

I want to update SharePoint survey answers using spservices so I used UpdateListItems to update this $().SPServices({ operation: "UpdateListItems", async: false, webURL: params....
2
votes
2answers
2k views

Event Receiver not triggered by Approval Workflow

I have a simple workflow that approves a List Item. I have an ItemUpdated Event Receiver that is supposed to compute some fields and update another List Item. My event receiver gets triggered when I ...
2
votes
1answer
846 views

How to prevent document editing and properties updating

I need to be able to prevent the document in document library to be edited and it's properties updated when the custom document property DocState has a value Reviewed. Should I use document library ...
2
votes
1answer
695 views

Update list item from within list item

I have a list in SharePoint 2007 with a Person or Group type column, named "Attendees" which can contain multiple persons. I want to update Attendees with the logged-in user name on click of a custom ...
2
votes
1answer
2k views

Update Page Content using SPServices

I am trying to update a Page's content using SPServices. When I run my code, it does update the correct page, but instead of updating the content, it just removes the content. var newContent = "<...
2
votes
1answer
817 views

How to use Javascript to update a Discussion Board reply?

I have a Discussion Board with a series of replies. Each 'Message' (Reply) Content Type has an 'Answer' dropdown with the values 'YES/NO' (NO being default) I have created a hyperlink on the property ...
2
votes
1answer
689 views

Update Created By field in Document Library using web service

I am uploading documents to Document Library using copy web service. I need to update read only fields like created, created by, modified, modified by, version,.. I changed the read only property of ...
2
votes
2answers
2k views

Unable to update list item - Additions to this web site have been blocked

I am developing a SharePoint job. In the public override void Execute(Guid targetInstanceId) method, my code goes: SPSecurity.RunWithElevatedPrivileges(delegate() { int count = this.WebApplication....
2
votes
1answer
780 views

set or update multiple values cascading lookup field using client object model

I'm struggling since a couple of weeks with setting a multiple values cascading lookup field using a client object model, I could set the first value but then It show me an error of invalid lookup ...
2
votes
1answer
1k views

New choices are not shown in existing list items

I have my custom list template. The template initially described a field Position using the following XML element: <CHOICES> <CHOICE>1</CHOICE> <CHOICE>2</CHOICE> &...
2
votes
1answer
4k views

Programmatically update Recurrence parameters for calendar entry

I'm building a Sharepoint service, which allows users to book company's resources, such as conference rooms, etc. The back-end is implemented with standard Calendar list, the front-end uses JavaScript ...
2
votes
0answers
147 views

Update “People or Group” and “Hyperlink & Picture” columns using “Build a Dictionary” action

Using SP Designer 2013 workflow, a list from a Site Collection A is updated by a list in Site Collection B. I used the below article to achieve this. https://mysharepointexperiences.wordpress.com/...
2
votes
0answers
265 views

Attach file in Datasheet View

SharePoint 2007 allowed adding attachments to list items in Datasheet view. However, with SharePoint Online (Modern / Classic view) I do not get any options for attaching items in Datasheet view. Is ...
2
votes
0answers
367 views

Disable SharePoint 2013 Workflow Trigger when updating list item via CSOM

I have multiple lists in my SharePoint application that have workflows attached to them. These workflows trigger when list items are updated, which when updated from the SharePoint UI is the intended ...
2
votes
0answers
449 views

batch command to update SharePoint list item using updatelistitems

I am new to SharePoint and i need help to update lookup field, multi line of text field and date field from one list to another list using SharePoint web services updatelistitems. Is there any way to ...