Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [client-object-model]

API for interacting with SharePoint from .NET, Silverlight, and JavaScript.

Filter by
Sorted by
Tagged with
0
votes
1answer
101 views

Please explain javascript function call in the below code snippet [closed]

I am not able to understand how getWebs() function is called (highlighted below). What is the flow of execution for the below snippet. This code snippet works. Please also mention what it is called in ...
0
votes
1answer
2k views

add user on a user lookup field CSOM - SharePoint 2013

I am trying to submit some data from a winform into a SharePoint list. Most of the items can submit fine except for the a field which is a user lookup field. I have done this in the past with a ...
1
vote
2answers
471 views

Retrieve list items with date query using client object model

I wrote this caml query to get the data. the query i wrote- <View> <Query> <Where> <And> <Eq> <FieldRef Name='AccNo' /> <Value Type='...
0
votes
1answer
251 views

Get count of items in a Grouped View using JavaScript

is there a way to get the count of items in a Grouped View via Javascript? The grouped view already has a count, but want to pass along that count to another object (a chart) and can't get past the ...
1
vote
1answer
182 views

I have a Approval workflow.I need to show pending workflows on the home page it should have people who need to approve

I need to create a Dashboard kind of thing on a page to display approval process status of a workflow for a document, who need to approve and what is need to be approved and due date and also link to ...
1
vote
1answer
398 views

Read mail and add values from mail body to SharePoint list

I have a requirement where I have d to read mail (in a prescribed format) from a folder in outlook inbox, separate the values and create a new item in SharePoint list and then move the mail to another ...
0
votes
1answer
342 views

Get all the lists on sub webs using javascript

I would like to know how to get subweb lists using CSOM. I actually know how to get lists on a web and how to get a sub web collection but I can't figure out how to get lists on sub web collection. ...
1
vote
3answers
3k views

Update multiple choice column values while creating new list item using CSOM

I have a requirement where I have to select the values of a choice field while creating a new item using CSOM. I'm able to update other fields, but for choice column, the value gets stored in the ...
1
vote
1answer
378 views

Get Web Author in Client Object Model

Server API provides SPWeb.Author property to access the creator of the site. However, managed client object model Web API doesn't seem to provide any such property. What is the alternative to get the ...
0
votes
1answer
758 views

Creating list item from outlook mail

I have a requirement where I have to update list item in a list fetching values from an e-mail. I have to create a button in the outlook ribbon, clicking on which the values (in key-value pair) should ...
2
votes
1answer
3k views

First time connecting to SharePoint Server 2013 from Console

This code is supposed to be the simplest code for connecting. Like a "Hello World" program: static void Main(string[] args) { var targetSite = new Uri("http://w2k12spps02/sitios/...
0
votes
2answers
208 views

SharePoint 2013 HomePage customization

I am looking to hear development options for below requirement. I need to create Homepage for the company as shown in the image. The Body of the page contains various images with there hyper links ...
0
votes
1answer
198 views

find out what item id failed executeQueryAsync item creation

How can i find what item failed executeQueryAsync add item method ? this is my code : var itemArray = []; var siteUrl = "http://MySite/MM/cm"; var clientContext = SP.ClientContext.get_current(); ...
1
vote
1answer
1k views

How i can disable a column from the lists' Quick Edit Grid using a JSlink which is linked to list view webpart

I want to disable the Title column from the Quick Edit grid, inside certain web-parts so i did the following steps:- 1- I went to a list view. 2- Edit the page 3- Edit the web part. 4- Under the "...
1
vote
1answer
723 views

Get expanded recurrence using CSOM or at least filter future items on Lists.asmx

I need to get all events in a calendar, including series (with expanded recurrence), then I saw that I'm able to get this data using the Lists.asmx web service and CAML query from this link: https://...
1
vote
1answer
2k views

How to pass user's identity to Client Object Model when using ASP.net?

How can I pass an authenticated user's identity through the Client-Object Model? SP 2010, Client Object Model code is on an IIS server. I want to pass the already authenticated Windows user to ...
2
votes
0answers
504 views

could not access library via CSOM/REST API if end user only has permission on the library but not the web level

This is on SharePoint Online and here are the env setup: Site collection: https://xxx.sharepoint.com/sites/sitecollection1 - End user has Permission Subsite: https://xxx.sharepoint.com/sites/...
4
votes
3answers
289 views

Cannot Query Document Library with > 5K folders

I have some SP .NET Object library code that will allow me to query for the contents of a specific folder in a document library. It worked fine in a UAT environment where there were only a few dozen ...
2
votes
1answer
936 views

How to Display Items Count Inside each sub folder inside a document library SharePoint Online

want to Display Items Count Inside each subfolder inside a document library SharePoint Online. using below code am getting all the folder items with count. using console application c# ...
0
votes
2answers
1k views

from list item object how to check is it a folder or not ? Using SharePoint Client Object Model C#

Have List item Obj. how to display it's item if it is a folder. using SharePoint Client Object Mode. here my code using (ClientContext ClientContext = new ClientContext(requestUrl)) ...
1
vote
0answers
211 views

CSOM Check Anonymous Access

I'm trying to write some C# CSOM code that creates a report of what websites can be accessed anonymously. In PowerShell, I would get this info with something like $webUrl | Get-SPWeb | % { $_....
2
votes
2answers
3k views

'System.Net.WebException' occurred in Microsoft.SharePoint.Client.dll

While running Sharepoint Client Side Scripting in Visual Studio getting error at the end of ExecuteQuery() It throws an unhandled exception of type 'System.Net.WebException' occurred in ...
0
votes
2answers
3k views

Retrieve all the Document Library with folder and file count using SharePoint Client Object Model

Hi Friends i have a SharePoint site having more Document Library's i just want to display this as a Console application using SharePoint Client Object Model. thanks in advance
0
votes
1answer
2k views

Update editor of published version without affecting version number - CSOM

I am trying to copy files from one site collection to another including their version history and preserve the metadata using CSOM. I am almost there using the below logic for each version of the file....
3
votes
3answers
4k views

How to use the FedAuth cookie in 'ClientContext'

We have to access a SharePoint site using FedAuth. We have the code which gets us the FedAuth cookie. What we are unable to get is how we would be using this FedAuth cookie in our ClientContext object....
1
vote
1answer
1k views

Alternative to using (Event Receivers & Server-side object model) when working with Office 365 sharepoint

I have being working with on-premise sharepoint 2013. and a lot of functionalities i have been doing were implemented inside Event Receivers when item added/updated. Where inside Visual Studio 2012 ...
1
vote
1answer
467 views

Office365 app page doesn't have __REQUESTDIGEST

My app page doesn't have __REQUESTDIGEST on page elements. How do I get this value from sharepoint API ? I used this codes but return 403 Forbidden error var formDigest; $.ajax({ url: ...
1
vote
1answer
535 views

How to call Sharepoint 2013 API by Javascript in Farm Solution

I am developing a Farm Solution (full trust) with some custom WebParts. For one WebPart i want some ajax behaviour, so i thought: Why not use the JSOM API? My web part just want to retrieve the new ...
1
vote
2answers
835 views

JSOM Error in SharePoint Client Code When Retrieving User Object

Trying to figure out why I am getting this error with my code, am I missing a script reference, or is perhaps something wrong with the Context data grab section? Error: The property or field 'Email' ...
3
votes
4answers
20k views

Get User object from Person or Group field value using JSOM/JavaScript API

How do you get a User object from Person or Group field value using JSOM/JavaScript API? I am looking for something like this (See Vadim Gremyachev answer), but let me be clear I DO NOT WANT the ...
0
votes
1answer
668 views

Problems while checking if file is locked by user

I wrote a program that opens and modifies documents in a library. I tried to set it up in a way where the program would skip documents that are opened, locked or checked-out by a user. But apparently ...
0
votes
1answer
975 views

The property or field has not been initialized. Error throw in sharepoint online?

I have big problem. I tried a lot of solution for this issue but not worked. I need help. Here is my code. I try to get items from picture library. It's an app for sharepoint online. var context; var ...
1
vote
2answers
289 views

How to move / copy documents from one SharePoint library to another SharePoint library on different farms Using Event Receiver?

We have requirement to move /copy documents from one site to another, sites are on different farms( totally different environment). We can can copy items if library in same application/ site ...
0
votes
1answer
981 views

How to get ID field in form through internal name in SharePoint

I'm learning Sharepoint 2013 . I have a new form to add data . In that form i have a web part add javascript . In that script i want add code custom this form and i want get ID through internal name ...
0
votes
1answer
373 views

SP.Utilities.UrlBuilder.urlCombine Not working

I am trying to concat two strings using urlCombine method like this: SP.Utilities.UrlBuilder.urlCombine(_spPageContextInfo.webAbsoluteUrl, AnotherUrl); The AnotherUrl might contain a slash / and ...
1
vote
0answers
18 views

remove check out check in and download functionality completely from site collection

Please help how to remove check out, check in and download functionality from the site collection so that it is not available for subsites too. I don't have control over server hence I need to achieve ...
6
votes
1answer
254 views

what happens with items/lists when the creating user is deleted?

I have a user usr1 that i need to remove completely from a site collection. usr1 has created several lists and items within these lists. If i remove the user programmatically: ClientContext.Web....
3
votes
2answers
79 views

CSOM Error 409 because Slide is opend by another user

I am getting an error 409 while trying to write a file in a slide library. All I found on google until now is about wrong paths. But I already wrote about 90 other files in the exact same library ...
4
votes
1answer
157 views

Copying Selected List Items From One Custom List To Another

As the title says, I'm trying to get items from a list that are selected by the user to copy over into another list, "Shopping Cart". During the copy, I would also like to add a username field to each ...
0
votes
1answer
401 views

Connecting to SharePoint Online from on-prem SharePoint with current user

I have setup the cloud hybrid search between my on-prem SP2016 and SPO (SharePoint Online). I have azure ad synchronized with my ad etc. (without SSO). sample scenario: I am displaying results from ...
1
vote
2answers
604 views

How to display a string in client browser console using c#?

Let's assume I have a C# file in my SP2010 application and I want to display a message in the browser console. using System; using System.Collections.Generic; ... public class WhatEver{ // some ...
3
votes
2answers
124 views

How to Check Out Document Remotely

I am trying to check out a file remotely using the Sharepoint libraries: using Microsoft.SharePoint.Client; public void CheckOutFile() { // Set the context (URL) of the site var cc = new ...
2
votes
1answer
2k views

Sharepoint 2013 C# Add recurring event, Shows in calender view but is not there

From C# codebehind I added a recurring event SPList olist = web.Lists[appname]; SPListItem item = olist.AddItem(); item["EventDate"] = startdate;// 9/5/2016 8:00:00 PM // System.DateTime item["...
3
votes
1answer
2k views

CSOM The request uses too many resources error while provisioning web

I am provisioning web on SharePoint online using following CSOM code(provided hosted app), but intermediately we are getting "The request uses too many resources" error. using (ClientContext ...
0
votes
1answer
58 views

Is it possible to transfer authorized Windows's user credentials to SharePoint?

I have a console application that connects to the SharePoint and works with lists (I'm using SharePoint Client model). Code that connects with SharePoint is: SPCli.ClientContext _clientContext = new ...
0
votes
1answer
459 views

Upload a document into a SharePoint library with IRM

I'm trying to upload a file into a SharePoint document library using the C# CSOM library. The document library I'm uploading into has information rights management settings enforced. When I try to ...
1
vote
1answer
791 views

Which dll client version should I use to connect to both Sharepoint 2010 and Sharepoint 2013?

I have a web project that should consume both On-premise Sharepoint 2010 and Sharepoint 2013. So, we have two different versions of the following dlls : Microsoft.SharePoint.Client V 14.0.0.0 ...
0
votes
0answers
24 views

SharePoint Online provided hosted ribbon app running twice

I have a SharePoint Online provided hosted ribbon app (in Azure), the app perform query the document properties and check out the document, the problem is when the document process for 50 documents or ...
3
votes
1answer
3k views

Sharepoint client object model {File not found}

var onlineCredentials = new SharePointOnlineCredentials(ServiceUserName,securePassword); var context = new ClientContext(clientUrl); context.Credentials = onlineCredentials; ar cc = GetAllFiles(...
1
vote
3answers
2k views

Creating a sub-folder in a SharePoint with Client.dll in C#

I am trying to create a list of all the folders that exist within the root folder. From there I want to implement the creation of a folder if the folder does not already exist. Is there a way to ...