Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
The client-side object model (CSOM) provides access to a subset of the SharePoint Foundation server object model, including core objects such as site collections, sites, lists, and list items and allows you to program against these from client side applications.
2
votes
Creating a Managed Metadata column using CSOM
Try it as below:
if (field.TypeAsString == "TaxonomyFieldType")
{
Guid termStoreId = Guid.Empty;
Guid termSetId = Guid.Empty;
GetTaxonomyFieldInfo(srcContext, out termStoreId, out termS …
0
votes
Accepted
ServerUnauthorizedAccessException Issue with CopyTo() method in Sharepoint Client Side Objec...
CopyTo only works if you want to copy with the same site collection. If you want to copy across site collections, try below code:
public void CloneSitePages(string srcUrl, string srcLibrary, string d …
0
votes
Accepted
Disable Document Parser using CSOM
This property is not supported yet in CSOM.
Check the uservoice request and upvote it. … Support the Web.ParserEnabled property in CSOM
Using Powershell;
$web=Get-SPweb "http://siteurl/"
## Set the ParserEnabled property to False to disable the document property promotion
$web.ParserEnabled …
0
votes
How to get username from ChangeItem Object
Try the below code:
var col = oList.GetChanges(cq);
clientContext.Load(col);
clientContext.ExecuteQuery();
foreach (Change change in col)
{
List list = clientContext.Web.Lists.GetByTitle("Custo …
2
votes
Accepted
Search API with app only token
This is not a temporary bug, MS has enabled support for App only token in Search Queries for SPO. This is a permanent change.
For OnPremise environment, its not supported yet, neither in 2013 nor in …
3
votes
Create a text file in document library using csom
You need to use the FileCreationInformation to create a file.
Try the below code:
FileCreationInformation createFile = new FileCreationInformation();
createFile.Url = "test.txt";
//use byte array to …
2
votes
Get all items in list by Field Name caml query
You have not specified the what the field should contain.
For example, if the field name is country and you are searching for all countries named belgium, you need to put that in the query.
Replace …
0
votes
Accepted
How could i change the SharePoint Page <Title>?
You need to set the Title property after the file is added.
So, modify your code as below:
var file = sitePagesList.RootFolder.Files.AddTemplateFile(fileRelativePath, TemplateFileType.StandardPage); …
1
vote
Accepted
Modify quick navigation using c# CSOM
You are missing the executeQuery after loading the quick launch navigation node collection.
Modify the code as below:
cltContext.Load(cltContext.Web);
cltContext.ExecuteQuery();
NavigationNodeCollec …
2
votes
Accepted
Unable to initialise LimitedWebPartManager due to ServerRelativeUrl error
As mentioned, you need to pass the ServerRelativeUrl in the GetFileByServerRelativeUrl method.
The value that you are passing, SitePages/Home.aspx, will not work, it needs to be something like /sites …
2
votes
Accepted
How to retrieve Attachment's FileName with CSOM
You can use the GetByFileName method of the AttachmentFiles to determine whether the attachment exists or not.
Modify your code as below:
ListItem item = list.GetItemById(_id);
context.Load(item, l …
2
votes
Accepted
Sharing file via API in microsoft.sharepoint.online.csom
You can directly use the OOTB CSOM methods of Microsoft.SharePoint.Client.Sharing.DocumentSharingManager class and generate links as below:
var users = new List<string>() { "[email protected]", "user2@ …
3
votes
Accepted
Unable to access subsites through code but I can in the browser
The subsites that are displayed on the UI are permission trimmed.
So, there could be subsites to which you might not have access. The website.Webs will only work if you are site collection admin or …
2
votes
Accepted
How to add .sppkg or .app file to App catalog using CSOM
We can use the ALM APIs with CSOM for this.
Ensure that you have the latest PnP Core version or atleast a version above November 2017. …
1
vote
Accepted
Activating treeview navigation by CSOM?
You just need to set the TreeViewEnabled of the CSOM SP Web object. … "X-HTTP-Method": "MERGE"
},
success: function (data) {
console.log("success");
},
error: function (err) {
console.log("error");
}
});
Reference - CSOM …