A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Hot answers tagged

2

Summarizing the "discussion" from the comments above: The codeproject article referenced in the question is apparently using either an incorrect or outdated schema for the CAML. When you set the ViewXml property of the CamlQuery, the top-level XML element should be the <View>. The <Query> is one of the optional child elements. SharePoint was ...


2

Instead of going with the coding approach, we can export the particular view items to excel with out of the box option. Export the SharePoint list items shown in the current view to Excel to work with the data in a spreadsheet. 1.Select Export to Excel Lists from the command bar of the SharePoint list. The classic SharePoint experience shows a ribbon ...


2

The following steps for your reference. 1.Create a console application using visual studio. 2.Install the package using the NuGet below. Install-Package Microsoft.SharePointOnline.CSOM -Version 16.1.19515.12000 3.Refer to the code example below to get list items versions. using Microsoft.SharePoint.Client; using System; using System.Security; namespace ...


2

Please refer this article. In short, you have to refer the newly released CSOM package 16.1.6906.1200 or higher. You can find the latest CSOM package for SharePoint Online from the NuGet gallery with an id of ‘Microsoft.SharePointOnline.CSOM‘. Adding the code sample below. // Get versions of specific document from library - item and file List list = ctx....


1

Install the SharePoint 2019 CSOM library using the NuGet below. Install-Package Microsoft.SharePoint2019.CSOM -Version 16.0.10337.12109 Then use the methods of MoveCopyUtil class to copy/move folders and files. Example: string dstUrl = "http://sp2019/sites/team1"; string sourceFolder = "http://sp2019/sites/team1/libraryname/folder1"; string destFolder = ...


1

For GeoLocationField: Assuming you have fetched the list items you want to update in oListItem then try something like below: FieldGeolocationValue oGeolocationValue = new FieldGeolocationValue(); oGeolocationValue.Latitude = (double)17.4; oGeolocationValue.Longitude = (double)78.4; oListItem["Address"] = oGeolocationValue; oListItem.Update(); context....


1

Using the below PowerShell code we can achieve this, in your code, there should be two functions: Function to check file exists - this will return boolean Then, in the upload function verify the check file exist, if this returns true - rename the file and the call the upload function. PowerShell to check if a file exists in SharePoint Online document ...


1

With a bit more digging, I found a way to remove an anonymous link: Sharepoint Online: How to unshare public links (AnonymousEdit/View links) via REST API using the Web.DeleteAnonymousLinkForObject method.


1

Please refer the following code snippet to create publishing page and set multi-value managed metadata based on another item: using System; using System.Collections.Generic; using System.Linq; using Microsoft.SharePoint.Client; using Microsoft.SharePoint.Client.Publishing; using Microsoft.SharePoint.Client.Taxonomy; public static string ...


1

I suggest you check if the exists page ServerRelativeUrl is right, and make sure the "Standard" field exists in the Pages library. The following code for your reference. string siteUrl = "https://tenant.sharepoint.com/sites/team"; string userName = "test@tenant.onmicrosoft.com"; string password = "xxx"; string newPageName = "new1227.aspx"; var ...


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