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

learn more… | top users | synonyms

0
votes
0answers
9 views

Update SharePoint List when clicking button on InfoPath form

I have an InfoPath 2013 form that pulls information from numerous sources, including several SharePoint lists. There is a button on the form (NOT the Submit button) that does some work behind the ...
0
votes
0answers
12 views

SharePoint User Impersonation through CSOM in SharePoint/Office App

I am trying to create an Office App for Word that will have read access to a List in a SharePoint tenant. The goal is to show only the items on the list that are published and within the user's ...
1
vote
0answers
14 views

clientContext.Credentials = CredentialCache.DefaultNetworkCredentials - in CSOM returns 401 unauthorized thru IIS

I am trying to access sharepoint site using CSOM with Windows Authentication. It works if I run it in visual studio on a server. However, it returns a 401 unauthorized when I run the site thru IIS on ...
3
votes
0answers
58 views

Javascript Conflict on Visual Webpart when adding multiple times with different webpart properties on single page

What I am doing: I am retrieving list items from list using javascript as per visual webpart custom property. I have created a dropdown in webpart editor part from where I am getting site url. As per ...
0
votes
2answers
19 views

SharePoint 2010 Client Object Model code for different site - Value does not fall within the expected range

I am trying to fire some real basic CSOM calls by button clicks on an HTML form. The only problem is the form needs to be located on one site and the SP.file objects might be located on another site. ...
1
vote
1answer
30 views

How to create a list template by using CSOM?

For creating a list template programmatically by using server object, I'm using the SaveAsTemplate() function. SPSecurity.RunWithElevatedPrivileges(delegate { using (SPSite oSPsite = new ...
1
vote
1answer
29 views

Can we distribute SharePoint DLLs with our application

Is my understanding of following page correct that we can distribute Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll with our application? Like we reference these DLLs in ...
0
votes
1answer
16 views

Unable to return Microsoft.Sharepoint.Client.File object Names filtered by extension

I'm attempting to retrieve a set of File objects filtered by extension. The following code works correctly (without the filter). FolderCollection productModelFolders = ...
0
votes
1answer
23 views

Getting error from display multiple selected external list item javascript

So here's the javascript I use to display item name of selected item from an external list: <script type="text/javascript"> var targetListItem; function ShowSelectedItems() { ...
0
votes
1answer
27 views

Copy SharePoint file from Http to Ftp

Is there a direct way to copy a file from a SharePoint library to an Ftp location? Currently, I'm able to download the document to a local directory using the OpenBinaryDirect method, however this ...
0
votes
1answer
52 views

Can you display all fields from a SharePoint list without writing them specifically?

Is it possible to retrieve every field value of a SharePoint List Item and display them on a web page without specifically calling them individually? I know it is possible to retrieve all the items ...
0
votes
1answer
34 views

Retrieve file version metadata with CSOM

My organization is requiring that we rewrite all of our sandbox solutions as we shift to SP 2013 as provider-hosted apps using CSOM. One of the event receivers I wrote would previously use the ...
0
votes
0answers
32 views

Check if user has access on site using client object model

Need to check if any user (provided user name) has access to site using c# client object model. It is sharepoint online site. Any suggestions/help is greatly appreciated.
0
votes
1answer
19 views

Sharepoint App: Create a list using javascript on the host web, list does not appear on site content

So here I am creating a list on a sharepoint app, the app has full control over the host web. I run the code and it does not trigger any exception, but If I check the host site contents, the list does ...
1
vote
0answers
16 views

Copy all folders in a library to another library [duplicate]

I have a Sharepoint library which is having 10 folders, i want to move those folders(along with files inside those folders) from one library to another library with in same site using CSOM**(C#)**. ...
0
votes
0answers
22 views

SharePoint online : Add a property in property bag of host web using JSOM

I am working on a simple SharePoint hosted app which has two text boxes to take input KEY and VALUE and add this to the property bag of the HOST WEB. I am able to read the existing properties from the ...
0
votes
1answer
76 views

How to get all checked out files in SharePoint client object model c#?

I need to get all checked out files from a document library. I am trying by following query. CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = @ "<View> <Query> ...
0
votes
1answer
26 views

Dynamic fields in SharePoint 2013 forms

I have a custom SharePoint list form where I would like to have country names(from another list) in one row with a check box in front of each row. On checking of any check box in front of country ...
0
votes
0answers
23 views

SPService object is not loaded!

I am working on a script to fetch the user profile services and get the current logged in user. This was initially working on IE8 and not working in IE11. Now its not working in any browser, any ...
1
vote
2answers
34 views

How to use Microsoft.SharePoint.Client.File.SaveBinary method?

I want to save a file from document library to local drive. I am using the Client Object model approach model in development. The following is the code that I use: ...
0
votes
0answers
21 views

update list items from one site to another site using client side object model in SharePoint

We migrated a site from lotus notes o SharePoint to different SharePoint server which is not in our control,in SharePoint site created by and modified by values are coming as current system login ...
0
votes
1answer
44 views

List web part with option button in place of checkbox

I want to allow on a list web part a mutually exclusive selection for the items, so that I can force the user to select a single item and retrieve the item id using the SP.js JSOM. There is a problem ...
0
votes
0answers
22 views

People Picker in Client Object Model 2010

So I am trying to build an equivalent to a People Picker in Windows.Forms Application. Since 2010 does not have Web.SiteUsers like 2013 does I had to write it like this. public UserPicker(string ...
0
votes
0answers
17 views

Access denied error opening SharePoint hosted app in dialog in Internet Explorer

I am trying to make an app that opens in a new dialog but am unable to use it in Internet Explorer in a new dialog. It opens perfectly fine in a new page but I am getting an access denied error in ...
0
votes
0answers
22 views

how to get client context in a external js file

I have a SharePoint event list where start date and end date needs to be formatted to clients time zone. I am thinking of getting the regional settings and then converting the time. I have to write ...
1
vote
0answers
21 views

select login name items from list client object model

I don't get the title, or any item in the get_Vote_onSuccess function see below the code: var ctx; var collListItem; var web; var loginUser; $(document).ready(function () { ...
0
votes
0answers
59 views

How to retrieve webpart xml-definition programatically

I have a Custom Webpart deployed in the Site, to which I need to retrieve the XML definition programmatically using Client side object model, can anybody help? EDIT: I used the following code. ...
0
votes
1answer
27 views

How to verify feature staus (enabled/disbaled) using client object model in SharePoint online?

I am working on "Retrieving activated features of specific scope". I have written following code. ClientContext context = ContextManager.GetClientContext(cred, siteUrl); Site site = ...
0
votes
1answer
42 views

Client Object Model checking permissions on Webs

I'm currently writing a SharePoint hosted app that displays a treeview of a site collection on a site that is not the current. To do this I have an admin account that has permissions over both of ...
0
votes
0answers
69 views

Value does not fall within the expected range - CSOM

What is the reason for the below exception message in CSOM code which I received when querying for data from SharePoint Online? Value does not fall within the expected range. Code sample: public ...
0
votes
1answer
73 views

Load all fields for a specific ListItem using CSOM

I want to load all FieldValues for a specific ListItem ForExample public ListItem GetItemById(List SPList, int id, string[] fieldNames) { using (Ctx) { ...
0
votes
1answer
29 views

Get Item ID not working

I'm trying to get the ID from a SharePoint list, however I cannot obtain it. ctx_load(Include(ID)) does not seem to work. When I call items.get_id(); it returns undefined. Also, the items object is ...
1
vote
0answers
16 views

SharePoint newly created Group's description is not fetched using CSOM

I use below code to get the SharePoint Site group's data. Description of the default groups like owners, visitors were fetched correctly but the same code returns null for newly created group's ...
1
vote
1answer
38 views

Cannot contact site at the specified URL https://www.server.com:1234/sites/test/

I want to create a list item using SharePoint Client object model (SharePoint 2010). string siteURL = @"https://www.server.com:1234/sites/test/"; using (ClientContext spcontext = new ...
0
votes
0answers
48 views

How to get user profile properties when getting users in javascript CSOM in SP2013?

I download users like this, but the problem is I have to make 1 request to download all users, then 1 more request to download the properties of the users. So that's 2 requests. I want I specify the ...
0
votes
0answers
33 views

How to use CAML with CSOM for getting users in SP2013?

I want to get all the users in CSOM SP 2013 in javascript, but I don't want all users. I want to filter them by CAML. This is what I have so far which filters by first name is Tom, but the CAML is not ...
1
vote
0answers
24 views

How to search in custom metadata columns of document library using QueryService object

I have a SharePoint Library 'Contact' In this library i have created some custom column. Have gone through all the steps of 1st Full Crawl, automatic generation of crawl properties, creation of ...
0
votes
2answers
277 views

Get User id from people picker client side

I have created people picker on client side using SPpeoplepicker.js. $("#peoplePickerDiv").spPeoplePicker(); Everything works perfect all user display in people picker and i can select multiple ...
0
votes
0answers
12 views

ServerObjectIsNull not working correctly?

I'm very confused about the usage of ClientObject.ServerObjectIsNull. In our current project we use this property very often to validate if an artifact is already existing on server side. Until now it ...
0
votes
1answer
77 views

How to get Sharepoint 2013 variation URL?

I want to create a toggle button for variations, so that when I am on the en or fr page, and I click the button it takes me to the other page. But I can't just change the en to fr, for example, ...
0
votes
3answers
67 views

How to update list items using JavaScript Object Model in SP 2013

I am trying to update list item's value through JavaScript object model in SP 2013. When I call set_item('fieldname','mvalue'), it does not throw any error, but it fails to update. How to ...
1
vote
0answers
40 views

Bulk Create folders in document library using client object model

I want to create folder on SharePoint document library using client object model (C#). Below is the code which does that. ContentTypeCollection listContentTypes = list.ContentTypes; ...
0
votes
0answers
24 views

Default Service account in SharePoint

What does the default service account property means in the SharePoint farm? Also, what is the difference between default service account and farm administrator account, if both are different? I'm ...
0
votes
0answers
91 views

Set client side choice field to stored value via JSOM

I am using Angular on top of SharePoint for an application. One of the fields I have is a choice column. I am able to get the values and store them in SharePoint/accessible via REST in my create form, ...
0
votes
0answers
16 views

The given key was not present in the dictionary while adding RoleAssignment To Group

My snippet should get a Group from a production SC and copy it to Test(same) SC. Until this point, everything works like a charm, group is created, Owner set and People copied to the with no ...
0
votes
2answers
49 views

ListItem.get_id() return “-1” after adding value in custom list

I am trying to add value in custom list of SharePoint using COM and Javascript. Code work file but i can't see any item added in list. also i got id of recently added item is "-1" This is my code. ...
2
votes
1answer
81 views

Use a colleagues' browser settings to detect their time zone and update the date format and time to reflect the time in their time zone

In the Events web part, the date displayed should reflect the date for the event based on the user’s time zone. Can this be achieved by client side This is the sample events webpart: I have till ...
0
votes
0answers
11 views

How to connect to ping federate site(sharePoint 2010 sites) from a tool which runs on windows machine?

We need to sync two sites. One is intranet SharePoint 2010 site and other is external SharePoint 2010 site. The external site uses pingfederate authentication. We need to run a tool to synchronise ...
1
vote
2answers
153 views

Get SharePoint List data & Bind to Gridview by Client Script

I need to get data from SharePoint List using Client Script (JavaScript) and bind same data to GridView using Client Script (JavaScript, JQuery, etc...) kindly suggest me on this.
0
votes
0answers
67 views

How to get Groups RoleAssignments with COM

I'm trying to retrieve Roles Assignments and SPRoleDefinitionBindingCollection from a Group .Probably, I'm using the wrong method to that. The RoleAssignment groupRoleAssignments = ...