Tagged Questions

Acronym for Client Side Object Model. It comprises both managed (.NET) and JavaScript object model (JSOM)

learn more… | top users | synonyms

2
votes
2answers
622 views

Create list from custom template using csom, c#

I would like to create a list based on a template (.stp uploaded to the list template gallery), it almost works with this code: ClientContext context = new ClientContext("<Your Site URL>"); ...
1
vote
1answer
445 views

SP2013 C# REST File upload

I'm working on a piece of software that uploads files into a given sharepoint directory from a remote location (ASP.NET MVC). I have everything working properly, uploading with CSOM when files are ...
3
votes
1answer
497 views

Change masterpage from Seattle to Oslo using CSOM, Sharepoint online

Using CSOM and c#, I would like to change the master-page from Seattle to Oslo. Can anybody help me?
0
votes
3answers
357 views

Get User Details From REST Data using CSOM

I am currently using REST to query a discussion board list. The results I am then displaying nicely in a table using bootstrap. We are using office 365. The REST query returns an authorID. How can we ...
1
vote
0answers
378 views

CSOM caml query list view lookup threshold

I have a list with about 15 managed metadata columns in it. Now I want to query that list using CSOM. I don't want to retrieve all the columns values so I limited the column values retrieved by using ...
0
votes
3answers
148 views

Add an app through CSOM

I'm trying to install an app on a site collection via CSOM code. First I'm getting the list from the appcatalog on the app catalog site collection. Then I'm getting the app-file as a listitem and ...
0
votes
2answers
164 views

Load more list items on scroll

I am showing the first 5 list items on the page (in one div). Div has vertical scroll bar. I want to show the remaining 5 items on when scroll goes down end. I am using CSOM to fetch list items. Any ...
0
votes
0answers
24 views

Filter ListView by Current User's City

I have a 2013 list view on a custom page. It is working with JSLink + all of the great OOB features. I have a city column in that list. How can I dynamically filter it based on the current user's city ...
0
votes
1answer
655 views

CSOM Javascript - when executing query on multiple lists getting error - SharePoint 2010

Is here any SharePoint expert, who can help me find out, why I am getting error on lists queries? I am trying to fetch data from multiple list asynchronously, but I am getting following error: The ...
2
votes
2answers
235 views

Update available page layouts of web using CSOM

Is it possible to update the available page layouts of a web using CSOM? In the interface you can change them by going to the site setting and then to page layout and site template settings, but I ...
4
votes
3answers
572 views

Set DateTime (utc) to listitem (CSOM, SP2013)

How to set UTC timezone to a listitem's DateTime field without executing query each time? This would be slow for many datetime fields and items: var utc = DateTime.UtcNow; var localTime = ...
0
votes
1answer
244 views

Create Next and Previous Paging Using Sharepoint List and SpServices

can anyone help me in Creating Next and Previous Paging for SharePoint List Using Sp-services With Client Side Template Binding . Below is the Code Which I was Using. $().SPServices({ operation: ...
0
votes
2answers
134 views

SharePoint Hosted App Code behaves different

This code is working if i dont use it in a app. But in a app its not working. The app is sharepoint hosted, and the list is on the same domain as the app. context = new ...
0
votes
1answer
56 views

Unable to system.string to system. guid - CSOM

I have a picture slideshow webpart which displays images from a particular library with a particular view. I want to change the webpart property - view using jquery. I have used CSOM to get the ...
0
votes
0answers
13 views

Get IconURL from Microsoft.SharePoint.Client.File object [duplicate]

I am using Microsoft.SharePoint.Client.File object by iterating through a FileCollection. The problem is that this object does not contain the IconURL property. Due to certain reasons, I can not use ...
1
vote
1answer
60 views

ICustomRouter interface >> CSOM or Server Side Object model

We are looking into a custom document route, and I know about the ICustomRouter interface. Can it be used in CSOM? The ICustomeRouter example here: ...
0
votes
1answer
41 views

How do I deep copy a library item to another library?

We have an outside document app (PCM) that has a nightly sync to our SharePoint server. All contracts in PCM are synced into SP then we change the PCM document to a link to SP. Recently, we have a ...
2
votes
2answers
748 views

Why does “sp.js” load only when I am editing a web part page?

I have created a page and would like to use some functions that require sp.js to be loaded, but it never seems to load unless I am editid the page (Site Actions -> Edit Page). Trying to find the ...
0
votes
1answer
95 views

Search Configuration Import CSOM

I'm trying to import a search configuration XML using a SharePoint App. I have check the following: The XML is correct. I can upload it manually. The code works using a console app, but not using ...
1
vote
1answer
288 views

Alternative to CSOM ListItem.get_item

The only way I know to load a sharepoint list via Javascript is to load it and on the current list item: var value = currentItem.get_item(columnTitle); I want to be able to load an item and on the ...
0
votes
0answers
61 views

Route documents to another site collection if approaching size limit

We'd like to have a Drop Off library look @ the current site size, and if it is approaching a limit, send the file to a different site within the site collection. It's kind of like a "you are ...
0
votes
0answers
32 views

Remove document from in-place hold with CSOM?

Is there any way to remove a document from an in-place hold using SharePoint CSOM?
0
votes
0answers
55 views

JSRender modify dispform.aspx button

I want to modify the button, the display text and the url link. How can I do that with JS-Link?
0
votes
1answer
56 views

Using results of executeQueryAsync with JSGRID

I understand I can retrieve the list data using context.load(data) and later firing context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, ...
0
votes
0answers
61 views

User or Group field SharePoint 2013

I have a field in a list that is a group or user field with multiple user choice. Now i want to check if there is 3 users in that field, i want to check if the current logged in user is equal to the ...
1
vote
1answer
265 views

CSOM Workflow API InteropService cannot start new instances of Workflows

On my SharePoint Online site, I have created a SharePoint 2010 Site Workflow through SharePoint Designer. Now, I want to create an instance and start that workflow through the CSOM Workflow API. ...
1
vote
0answers
94 views

Find Zone ID of list view webpart remotely

How to find the ZoneID of a list view webpart remotely? We can use any means to get the information; CSOM, JSON, web services or hacks. But we cannot use server-side code. We can know any information ...
0
votes
0answers
18 views

Hide Elements on topnavigation

I have a metadata navigation dropdown in SP 2013, How can I hide a specific element with a specific title?
0
votes
1answer
140 views

Sharepoint CSOM and ensure user

I'm converting a console app into a WCF service and have hit a minor snag. since there are more than 2500+ records to process and for each record I need to ensure the user initials in the list, ...
0
votes
0answers
31 views

CSOM search and offline availability property

How do I disable the Search & Offline availability property using CSOM. I need to disable the sync feature in all my site collections.
0
votes
0answers
175 views

SharePoint csom set_item limitation

Is there a limit on set_item with csom ? If i add a third: olistItem.set_item("Body", "test"); It doesn't work var theList = clientContext.get_web().get_lists().getByTitle('userData'); ...
2
votes
1answer
316 views

Rest Query Managed Metadata Filter

I am currently writing a JSON query for office 365 (sharepoint 2013) where the filter is suppose to filter depending on values returned from a managed metadata field I am trying to filter based on ...
2
votes
2answers
503 views

Rest Javascript Query Managed Metadata field

I am query a list via rest results I retrieve fine in Office 365 (sharepoint 2013). I have two fields of which one is a managed metadata fields. I am looping through the results retrieved but when ...
0
votes
1answer
110 views

Updating current item using jslink

I am working on a solution where in I have to update current item based on a button click. I am thinking of using JSLink to generate button with each row, when this button is clicked i have to refer ...
0
votes
0answers
67 views

Uploading versioned wiki pages to sharepoint using CSOM

I'm trying to upload versioned wiki pages to sharepoint using CSOM. I store the files to be uploaded in FileCollection and the following is the code FileCollection.AddTemplateFile("Filename", ...
0
votes
2answers
1k views

how to get SharePoint lookup field value using powershell

Can anyone show me how can I get the lookup field value? I used this line of code but it is throwing an error: #$Lookup = new-object ...
0
votes
1answer
122 views

How is Project Site newsfeed accessed by CSOM

I've created a subsite based upon the "Collaboration/Project Site" template. This template creates a newsfeed content of type MicroFeed. I would like to use CSOM to extract the content of the posts ...
0
votes
3answers
822 views

Why this code is not working in CSOM: “new SP.UserProfiles.PeopleManager(clientContext)”

This is the code which is not working. I have this code in my dispForm.aspx. <script type="text/javascript"> var personProperties; function getUserProperties() { var ...
0
votes
1answer
50 views

Csom code works if alert is implemented

This code works if i have a alert before , when i remove it, the isUserInList always shows false. Maybe i need to have a return value in CheckIfUserIsInList(); function ? var isUserInList = ...
0
votes
2answers
540 views

SP2013: Get path of current listItem in Javascript/CSOM?

I am customize the DispForm.aspx with some javascript code. I would like to get in javascript the path of the current listitem. How can I do that? UPDATE: I have now this code to get the path/url of ...
1
vote
2answers
600 views

sharepoint csom get address and phonenumber from current user

I am building some CSOM code in my DispForm.aspx. I try to get the current user from the context. This works and I can get the loginName, id, title and email. But I would like to have the address and ...
1
vote
0answers
1k views

The remote server returned an error: (401) Unauthorized. Using CSOM in ASP.NET MVC 4

I'm trying to pull data through SharePoint 2013 BDC Models that I have imported from my ASP.NET application which works fine when I run either locally on my machince or locally on the server. ...
0
votes
0answers
123 views

Simultaneous update, delete and add a list item to a sharepoint List object

In the MSDN documentation for C# CSOM, there are separate examples for adding, updating or deleting a single list item from a sharepoint list object (ListItemCollection) Is it possible to combine ...
0
votes
2answers
560 views

CSOM and Managed Metadata Field

I'm trying to use the Client Side Object Model of SharePoint 2013 to read a managed meta data field but I get null results When I look in the Site Columns, there are 5 fields in the "GroupName" ...
1
vote
0answers
157 views

SharePoint Online CSOM create managed properties

I'm trying to find a way to deploy search managed properties via script to my Office 365 SharePoint tenant. Previously, for on-prem SharePoint I've achieved this using PowerShell - fairly straight ...
1
vote
1answer
134 views

SharePoint CSOM Unit Testing

I am currently using CSOM to upload/download files from SharePoint 2013 sites. I would like to know what would be the best way to unit test my operations. Is there a way I could create a fake ...
0
votes
1answer
88 views

CSOM list item manipulation

Short and sweet : I'm parsing an XML document and adding new job openings into a sharepoint list as well as deleting them if the job id's and deleting them if the particular job id is not present in ...
0
votes
1answer
316 views

CSOM vs REST in sharepoint 2013 in terms of performance

CSOM vs REST in sharepoint 2013 in terms of performance and why.I have been having this question for a long time and I have not got a clear picture on this.
1
vote
1answer
130 views

Script to update Sharepoint Online content type

I have a content type "TestContentType" with three columns: Document Type Category Sub-category This content type is used on 18 document libraries, in 3 site collections. The Category column ...
0
votes
0answers
329 views

CSOM OpenBinaryDirect generates 401 error on office 365

I have used same instance of ClientContext inside a RemoteEventReceiver (MinRer.svc.cs) in a provider hosted app to get RootWeb, SubWebs, ListItems and I have added ListItems to lists. It works like a ...