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

learn more… | top users | synonyms

2
votes
2answers
900 views

Get list id from open view page via JavaScript

I have included some javascript in SharePoint master page, I need this javascript to have access to the opened list ID. For example when I load ...
1
vote
0answers
59 views

Check highest priority permission to access folder or file

if any folder or file has more than one permission(e.g. read and full control) for any user or group to access it if i check that permission in code how to check highest priority if folder or file has ...
0
votes
1answer
67 views

SharePoint current user is wrong

If I logged in as a different user in SharePoint below code doesn't show current user logged in user, what is the problem? Web web = clientContext.Web; User user = clientContext.Web.CurrentUser; ...
0
votes
1answer
228 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, ...
1
vote
2answers
552 views

Moving documents from one server library to another server library programmatically

I am a beginner in Sharepoint and given a task to write timer jobs. Once triggered, I want to move documents from one Sharepoint server library to another server library programmatically. So far my ...
2
votes
1answer
861 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
1k 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 ...
4
votes
2answers
664 views

Check if logged in user is member of AD group with ECMA script SharePoint 2013

There is active directory group added to SharePoint group. How would we can check that the logged in user is member of that active directory group using ECMA script?
1
vote
1answer
185 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
2answers
3k 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
330 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
259 views

Check if the home page is checked out by the current user

Using JSOM, I would like to check if the home page is checked out, and if the current user is the one who checked-out the page. The test occurs from another page. Here is what I have now: var ...
0
votes
3answers
3k 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
71 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
990 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
1k 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
2k 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
233 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
790 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
269 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
335 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
227 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 ...
1
vote
1answer
93 views

Access Items in DocumentSet using JSOM

I'm attempting to access items in a DocumentSet using SharePoint 13's JSOM. I am able to access the generic list properties but I do not see how to access ContentType specific properties on the client ...
1
vote
1answer
895 views

SharePoint Online, javascript get user properties

I'm trying to get some user properties and alert them (I'm going to put them i labels later but just for now I'm using alert). I'm using a content editor with this code: ...
1
vote
1answer
1k 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
275 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
751 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 ...
1
vote
1answer
29 views

Get the SUM of Items from Media library in all site collections in SP2010 using JavaScript

How to get the SUM of Item Count from "Media" library in all site collections(more than 100) in SP2010 using JavaScript(or any other way). I've more than 100 site collections and each site collection ...
2
votes
2answers
848 views

delete all files in sub folder CSOM

how to delete all files in subfolder in office 365 using CSOM C#. I have code like particular file only but I need delete all files at a time.
1
vote
1answer
415 views

SharePoint JavaScript Object Model Security and Permissions

I am writing an application whose logic executes in the browser using JSOM. The application might have permissions that exceed that of those who access the application. Let's say the application ...
1
vote
0answers
20 views

Is it possible to query the status of a service application using the client object model?

My goal is to query the statuses of services and service applications from a remote machine. I don't want to actually interact with the services, all I need is the "Started"/"Stopped" status you get ...
5
votes
4answers
1k views

js library for REST and JSOM SharePoint basic tasks

I am just sick of writing again and again the same piece of code to use jsom Async requests, especially when it's for a SP-hosted app which envokes spexecutor. I am sure each developer has his own ...
3
votes
2answers
1k views

Modify Global Navigation CSOM

Can I modify the Global Navigation by using CSOM against a publishing site in SharePoint Online. What I would like to achieve is to hide some of the navigation elements in the global top navigation.
3
votes
3answers
901 views

Query multiple lists in a provider hosted app

I'm currenlty working on a provider hosted app that is hosted in Azure. In this app I need information with multiple lists in multiple sites, which are all in the same sitecollection.I'm basically ...
0
votes
1answer
99 views

BCS Managed Client Code Get all method instances

When using the class Microsoft.BusinessData.MetadataModel.Entity entity; does anyone know how to get all the External Content type operation method instances so i can dynamically pass the value to ...
0
votes
1answer
2k views

CSOM Item Level Security “Cannot add a role assignment with empty role definition binding collection.”

I am trying to create an app that will set item level security for certain items in a library. However, I am getting the error mentioned above after these lines: item.RoleAssignments.Add( grp, ...
0
votes
1answer
87 views

How to validate if a SharePoint group already has permission on the site using Client Object Model?

I'd like to check if a certain group already has permission on the site using the client object model. I couldn't find any good example for that.
1
vote
2answers
839 views

Copy all items in a folder to another location

How do I copy all items from one folder(include sub folders and all files) to another folder or location? I have to copy all items to one folder another folder by using C#
1
vote
2answers
1k views

query.set_viewXml retrieving everything

I am writing code for client side object model, and I want to retrieve items with specific title, like this: var context = SP.ClientContext.get_current(); var web = context.get_web(); var lists = ...
1
vote
2answers
2k views

how to get sub folder list and how verify the folder name exist or not using CSOM ,C#

i have to verify the subfolder names if not there in that list how to create dyanamically using CSOM and C#
4
votes
1answer
389 views

App prison break

Me an my colleges were discussing the possibility of breaking out of the sandbox that a SharePoint-hosted apps provide. As most of you know host webs in SharePoint 2013 are protected by deploying apps ...
1
vote
1answer
2k views

Sharepoint 2013 Content Search vs. Javascript CSOM

I did what this page teaches: http://code.msdn.microsoft.com/SharePoint-2013-Querying-a629b53b It works, but the thing is that I used the same KQL query in a content search webpart and I have ...
0
votes
0answers
340 views

SharePoint 2013 BCS External Data Column

How do I return all entities without using entity.GetFilters() ? I have the following and I can only seem to produce a FilterCollection. I would much rather have just all the enities because i am ...
2
votes
2answers
1k views

How to copy the complete folder structure one location to another location include all files and sub folders

I have folder structure like in Shared documents/East using CSOM and C# Main Folder Folder1 Folder2 File1 File2 I have to copy all folders with files to Shared documents/West ....
3
votes
1answer
366 views

Change SiteLogo via csom in SharePoint 2013

Regarding to this Question link. How can i change the siteLogo to a new one? Is it even possible to do it from a ConsoleApplication via CSOM?
0
votes
0answers
76 views

Best method of downloading a folder of content from multiple versions of SharePoint from .NET

I need to implement some code which, given a specific site URL and folder, will download all files within that folder and any sub-folders. I know I can use the SharePoint Client SDK for that, but one ...
1
vote
2answers
5k views

CSOM move the files one folder another folder

I have to all files from one folder another folder using CSOM and C# Thanks for your replay Huge Wood my code is below var targetSite = new Uri("https://hello.com//teams/Worldwide_Site"); ...
1
vote
1answer
273 views

Proper way to check if Web.Title is available (CSOM)?

We can check if Web.Title is available this way: if (!_clientContext.Web.IsPropertyAvailable("Title")) { _clientContext.Load(_clientContext.Web, w => w.Title); _clientContext.ExecuteQuery() } ...
0
votes
0answers
213 views

401 when authenticating against Sharepoint Online

Good morning. Being very new to SharePoint, I've been trying to write a very basic app to create a new site inside my Sharepoint Online tenancy, but I can't seem to get it authenticated. I'm using the ...
2
votes
1answer
401 views

What is difference between executefunc and executeordelayuntilscriptloaded?

Execute func: SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function () { console.log("Initiating SP.ClientContext") }); ExecuteOrDelayUntilScriptLoaded: ...