2022 Developer Survey is open! Take survey.
11 votes
Accepted

How to update multiple items in sharepoint list online using javascript

I have a list called rohit_list1 on which i am updating title for all the items with ID greater than 15. You Write your own CAML query to get ID's. Design : <input type="button" value="...
user avatar
7 votes
Accepted

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

Please find the code to update Created, Created By, Modified, Modified By using CSOM. ClientContext ctx = new ClientContext("http://siteURL/"); List list = ctx.Web.Lists....
user avatar
6 votes
Accepted

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

If you only use this for display purposes, why not use a different approach which does not require you to do updates on the list item at all.... Create the site column in a sandboxed solution. Your ...
user avatar
  • 345
6 votes

Fetch list item properties using Powershell

Try the following script: $web = Get-SPWeb http://YourServer/ListLocation $list = $web.Lists["TheList"] foreach ($item in $list.Items) { if( $list.Fields.ContainsField("ddlTest") -...
user avatar
  • 7,855
6 votes

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

Yes event receiver do get fired if item is updated from client object model code. This is how I tested it. Created a custom list and added a text column named "Quantity" to it. Then created a ...
user avatar
5 votes
Accepted

Updating Items in Another List

My scenario is update a field in another list. You can leave the variable and change others by your fields:
user avatar
  • 897
5 votes
Accepted

Pass file name having space to update operation using REST API

You can pass the display name of your SharePoint List in REST API call like below: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('abc list')/items" Also make sure you are passing ...
user avatar
  • 27.7k
4 votes

How to update multiple items in sharepoint list online using javascript

Since you haven't told us which API you prefer, below is demonstrated how to retrieve and update list items using JSOM API: function getListItems(listTitle) { var deferred = $.Deferred(); var ...
user avatar
4 votes
Accepted

Update readonly field using REST API

Explanation Based on your affirmative response to my comment, I've gone ahead and wrote this using the JSOM API. The script works by disabling the ReadOnly property on the RichMessage field, updating ...
user avatar
4 votes

SharePoint 2013 Workflow - Update List Item Based on Two Columns

Happily, this is straightforward to achieve. What you need to do is insert a section 'If' action immediately after the first, ensuring the 'and/or' toggle is set correctly at the second (and ...
user avatar
  • 612
4 votes

Column validation for past dates

As far as I know, it's impossible to validate only if particular field changes. It's by default that column validation would validate the data in this column when items are saved to this list. I ...
user avatar
  • 5,026
3 votes
Accepted

Fetch list item properties using Powershell

here is powershell script to list all properties and then how to change them. # Load SharePoint library [system.reflection.assembly]::LoadWithPartialName("Microsoft.Sharepoint") # Connect to the ...
user avatar
  • 56.7k
3 votes
Accepted

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

Since you don't need to use the SPServices library, you can accomplish this via REST and the moveTo() method. The following should work: var url = "/_api/Web/Lists/getByTitle('My List Name')/Items",...
user avatar
  • 5,690
3 votes
Accepted

update sharepoint list item based on title field

Update this <Value Type='Text'>" + objdocument.Title + "</Value>
user avatar
  • 28.2k
3 votes

updating list item of a file using CSOM

Try this clntCntxt.Load(newFile); clntCntxt.ExecuteQuery(); //check out to make sure not to create multiple versions newFile.CheckOut(); ListItem newFileItem = newFile.ListItemAllFields; ...
user avatar
  • 28.2k
3 votes

How to modify Author field of ListItem

In order to modify/update the Author field using the client object model, you need to make sure to Load the Source Item Load the User Object with Source Context Ensure the User Object in the ...
user avatar
  • 311
3 votes

Adding a new item to a Document Library Using JSOM

You'll need to upload the file using the SP.FileCreationInformation object, you can write to the list item that corresponds to the file by calling <file>.get_listItemAllFields() When you use ...
user avatar
  • 5,880
3 votes

SPServices : Write data into a list with UpdateListItems

Looks like issue with the internal name, please confirm the column internal name. try with may be "name" columns internal name, this can be default "Title" valuepairs:[["Title",name], ["description",...
user avatar
  • 3,083
3 votes
Accepted

Is Sharepoint List item update using REST API return updated data

SharePoint REST API does not return the updated item/object after updating it. You are right! It only returns status code 204 if the update request is successful. So to get updated item/object, you ...
user avatar
3 votes
Accepted

Handle ListItem attachments via CSOM

Please use below code: foreach (AttachmentFile file in data.NewAttachments) { var attInfo = new AttachmentCreationInformation(); attInfo.FileName = "Name"; attInfo.ContentStream = new ...
user avatar
3 votes
Accepted

Field is not updated

Reading through your code, Update call has been used like a property without brackets. It should be a method call as : $i["LinkToOperations"] = $field $i["CustomerURLText"] = "Updated" ...
user avatar
3 votes

SP 2010: JSOM function not working on page load

make the couple of changes as below. Use ExecuteorDelayUntilScriptLoaded to make sure you are executing logic after sp.js file loaded. Your topLists variable make it global as you are using in other ...
user avatar
3 votes

SP 2010: JSOM function not working on page load

Running your code yields an error: topicList.getEnumerator() is not possible, as topicList is an SP.List and thus, no function getEnumerator is available. If you incorporate the answer from Venkat ...
user avatar
  • 2,321
3 votes
Accepted

add attachments with javascript on item edit

You can create a custom File Upload control <input id="file_input" type="file"> (if you want to upload multiple files, use "jquery.multifile.js" plugin). Get files from the custom control and ...
user avatar
  • 6,516
3 votes
Accepted

SharePoint Online - Possible to update ID column value in a list for an existing item?

No, this is not possible. Even after setting the ReadOnlyField property of the field to false you will get an error when trying to update it: ❯ Set-PnPListItem -List TestList -Identity 1 -Values @{...
user avatar
  • 2,229
2 votes

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

I agree with Andreas - you don't have to call Update() or SystemUpdate(). We have code in production that changes permissions and doesn't call Upate afterwards. But almost every example on the ...
user avatar
  • 76
2 votes

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

You need to add properties in Excel and then align them to Columns in sharepoint. Make sure the names align. For Each Prop In WB.ContentTypeProperties If Prop.Name = "DateSubmitted" Then ...
user avatar
2 votes

Q: Can I update values of an entire column from a workflow?

This cannot be done with out of the box functionality, AFAIK. There is a free tool, called the HarePoint Workflow Scheduler. Once installed on the server, you can configure it to run on each item in a ...
user avatar
  • 8,722
2 votes

changing list item using Rest API not working

The following example demonstrates how to perform Update operation for a List Item via SharePoint REST API: // Update Operation // listName: The name of the list you want to get items from // siteurl:...
user avatar
2 votes
Accepted

Get user ID from display name?

I assume you have a customized page where these users enter the User's name and then you replace all instances of that name with a new one... To do this client side, you need to use the '...
user avatar
  • 903

Only top scored, non community-wiki answers of a minimum length are eligible