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

learn more… | top users | synonyms (1)

5
votes
1answer
4k views

Check if user is in a specified group

I would like to check with JavaScript if the current logged user is in a specified and specific group (for example called "Admins Group"). How can I do? Thanks
4
votes
1answer
457 views

Can i use sharepoint 2013 client object model for SP 2010

I am working on a product. Our product is built on top of .NET framework 4.5. We use Sharepoint client object model (v14.0.0.0) for communicating with Sharepoint (both SP 2010 and SP 2013). This works ...
3
votes
2answers
324 views

How do I programatically change the default value of, or remove from default view, title column using javascript?

Using the JSOM in SharePoint 2010, if I am creating lists programmatically using something like: this.myField= oList.get_fields().addFieldAsXml('<Field DisplayName=\'Key\' Type=\'Text\' />', ...
1
vote
1answer
2k views

Retrieve Iist Item column values with column names on Item click, JavaScript

I need to retrieve List item column values with column names on item click. In SP2010, I have a XSL which calls the JavaScript. I have sent the list item id through the XSL into the JavaScript ...
0
votes
0answers
29 views

set properties for ShimFileCreationInformation object

I am writing some unit test cases using fakes framework. I am using an object ShimFileCreationInformation from Microsoft.SharePoint.Client.Fakes namespace. Now, I pass this object to a function. ...
2
votes
2answers
518 views

How do I get a collection of document libraries using Javascript CSOM?

I'm working on an UI feature for my SP2010 site and would like to display a number indicating how many documents were added to a specific library since the users last visit. The UI will display a box ...
0
votes
0answers
110 views

Filter/compare two arrays from CAML query

I'm using JavaScript/Client Object Model to retreive some data by CAML query. I've 2 CAML queries. One retrieve all data from a specified column. The other query retrieve data from same column ...
0
votes
1answer
60 views

Issue when getting library GUID through JavaScript

I'm using SharePoint 2010. I need to get some SharePoint data on a list item hyperlink click. Inside the JavaScript file there is a method getLibraryGuid() I get the targetLibrary value with no issues ...
3
votes
2answers
309 views

Sharepoint unit testing using fakes framework

I have an application which uploads a file to SharePoint via client object model. Now I need to write unit test cases for this application. The problem is, I how do I write test cases for the ...
2
votes
1answer
857 views

SharepointOnlineCredentials not working in an app

I want to authenticate against sharepoint online site using SharepointOnlineCredentials class. Below code works fine in a console application. But the same code is generating error when written in wcf ...
3
votes
2answers
783 views

View custom field property value using JavaScript

I'm using SharePoint 2010. Need to retrieve the Custom field property values using a JavaScript. [Trying to do this during item click in the SharePoint list item view. I call the JavaScript on the ...
1
vote
1answer
513 views

How to use JavaScript to get form data, and add it to a list

Obviously it is possible to gather data from a form using JavaScript. Microsoft also claims that is possible to add items to a custom list using JavaScript, although I have not gotten that to work. My ...
0
votes
1answer
203 views

Equivalent of GetRolesAndPermissionsForCurrentUser in SharePoint REST API?

I have this code which is used to check if a user has permissions to access the site or not. jQuery.support.cors = true; $().SPServices({ webURL: sites[index], ...
3
votes
3answers
5k views

Retrieve list item using CSOM on SharePoint online isn't working

I've been stuck on this problem for couple days, I develop app model on SharePoint online using provider hosted model. From clientwebpart, i want to access sharepoint list item. I can access list ...
0
votes
2answers
2k views

Grant Permissions to List Items using existing SharePoint Group using Client Object Model

I have found examples on how to add users to SharePoint Groups using Client Object Model. Can anyone help provide an example on how to grant permissions to items in a List using an existing ...
1
vote
1answer
204 views

Get list at site collection level using SP.js

I have this code which is meant to get data from a list at the site collection level. var clientContext = new SP.ClientContext.get_current(); var oList = ...
1
vote
3answers
1k views

Using CSOM to get list item count for multiple lists

I am trying to create a function which should loop through all lists on current web and display their current item count. My code so far: <!-- language: lang-js --> ZN.updateDocumentCount = ...
2
votes
3answers
189 views

Need a way to identify files which have no checked in version

I wrote a script that traverses a collection, it's document libraries and gets a list of all files. I'm trying to find all the documents which do not have a checked in version and require a user to go ...
0
votes
1answer
360 views

How to change 'Modified By' column value when a new file is uploaded in SharePoint 2013 using Client Object Model?

I want to change 'Modified By' column value of a file that is being uploaded using Client Object Model in SharePoint 2013. The problem is that the version of the file is changing. Kindly help me. The ...
0
votes
1answer
217 views

Synchronize excel file with SharePoint online list

I want to synchronize data from excel file with SharePoint list on office 365. I have already built a utility which uses client object model to achieve this but it is very slow as item count are in ...
1
vote
2answers
640 views

running SharePoint utility on non-SharePoint server

I wrote a utility in C# to copy files from a network directory to a SharePoint document library. When the sys admin tries to run the .exe from a non-SharePoint server, he gets the following error: ...
1
vote
1answer
97 views

Surfacing an SharePoint Online Access Services query for use externally

Is there any way to write a query in Access Services for SharePoint Online, and surface its results through either web services or the Client Object Model for .NET? Like the way that the tables are ...
0
votes
1answer
94 views

CSOM and master page and page layouts: .html vs .aspx vs .master

When applying master pages and page layouts using CSOM, should we generally operate using .html files? What would be pros and cons of using .html vs .aspx and .master files?
2
votes
0answers
103 views

How to access Page layouts and site templates using CSOM?

How to access Site Settings > Look and Feel > Page layouts and site templates using CSOM? The page allows end users to change these settings: Subsite Templates: subsites can use any site template ...
3
votes
2answers
2k views

How to enable publishing feature using CSOM?

How to enable site collection publishing infrastructure and site publishing features using CSOM?
1
vote
1answer
83 views

Get Workflow ModificationID via JavaScript Client OM

I create a dynamic link to the workflow Midification form in SharePoint 2010. I can get all of required parameters such as ItemID, ListId and Workflow InstanceId via Javascript OM. The only problem ...
5
votes
1answer
165 views

SharePoint Client Object Model not returning hidden folders in document library

I am using the SharePoint Client Object Model to get information from a SharePoint 2010 document library to be able to delete old htm-files located there. The problem is that these htm-files have ...
0
votes
1answer
215 views

Jquery show loading progress [closed]

Good day, I have a page with several javascript pages that get loaded. How can I check that all the JS files have been loaded? I tried the below with just alert boxes. $(onPageLoad); function ...
0
votes
1answer
2k views

Add item in SharePoint 2010 document library using JavaScript [duplicate]

Is it possible to add a new item in a SharePoint 2010 document library using JavaScript (client object model)? I have successfully created list items in other type of lists, but when it comes to ...
0
votes
2answers
2k views

upload to document library subfolder in client object model

I'm using the Client Object Model to upload files from a network drive to a SharePoint document library. Here is how I would specify the upload location if I were uploading to the document library's ...
1
vote
1answer
96 views

I am not able checkin/checkout the files in sub folders in the document library using client object model. Below is the code I am using

public void CheckOut()// CHECK OUT FUNCTION { try { string siteurl = ""; string filePath = ""; ClientContext context = new ClientContext(siteurl); context.Credentials = ...
0
votes
1answer
293 views

Check-In & Checked Out files inside folder in Document library using Client Object Model

I am not able checkin/checkout the files in sub folders in the document library using client object model. Below is the code I am using. public void CheckOut()// CHECK OUT FUNCTION { try { ...
3
votes
1answer
507 views

Check- in & check-out files using client object model

As the title says, how can I Check- in & check-out files using client object model?
1
vote
1answer
629 views

Move documents from one folder to another in diferent library in different site collection from Client Object Model

I want find and move all documents from one folder to other in different site collection document library. Both the folders are at the sub folder level 3 from the actual list. Please let me know how ...
0
votes
1answer
380 views

How to create sub site context in sharepoint online using app model

I am trying to create a sub-site and some predefined lists in the existed site collection. I am successfully created the sub site in the site. But Now i want to create lists in that newly created ...
2
votes
2answers
331 views

Looping retrieved Items throws an InvalidCastException

I have some very simple code using the client object model to retrieve a list and all items from that list from a SharePoint 2013 Online site. When the ExecuteQuery() fires, I use Fiddler to view the ...
0
votes
0answers
184 views

programatically create “create new file” call out for a link

I've a link on my home page. when I click on it I've to open "Create New File" callout of user skydrive "Documents" library. I found there is a OOTB function "CreateNewDocumentCallout" function ...
0
votes
0answers
37 views

Detect that an item has changed after it is tagged

I am using the Client Object Model to work with SharePoint items and also the 'SocialDataService.asmx' web service to work with tags. I use the 'Modified' field of a SharePoint item to detect ...
0
votes
1answer
385 views

Call executeQueryAsync method second time gives first time result

In the code I tried to get the data from 2 different LIST. Input of the second query will be done after executing first list. $(document).ready(function () { $("#SearchButton").click(function ...
2
votes
3answers
2k views

Sharepoint 2013 Client Object Model file larger than 2 Mb exception

I am new to Sharepoint and Client Object model. I am stuck with a problem and not been able to fix the issue. I want to upload files more than 10 MB using Client Object Model in Sharepoint 2013. I get ...
1
vote
1answer
292 views

Button to Show/Toggle Sharepoint Ribbon

I would like to add a button to a webpart we have already created that increases usability for our document libraries. I would like this button, when clicked to toggle the standard ribbon that is ...
1
vote
1answer
2k views

Sharepoint 2013 App access cross site collections

I'm using SharePoint 2013 and I wrote an AppPart that needs items of a list other than it's host site collection. But it keeps popping up an error indicating that my request has been failed. Access ...
1
vote
1answer
537 views

Get Sharepoint 2010 search results using Javascript Client Object Model

I need Sharepoint search results from Cient Object model using javascript Client object model. Can anyone please tell me how to do it for sharepoint 2010
0
votes
1answer
81 views

Obtain 'Tags' of SharePoint item using the Client ObjectModel

I would like to obtain the 'Tags' for each SharePoint (2010, 2013) list item (either a document in a library or an item in a list) using the Client Object Model. I haven't found any API that let's me ...
0
votes
1answer
191 views

Display Form Text Inaccessible via JS

I'm overriding the Display Form of a list as per Mark Rackley's blog post: http://www.sharepointhillbilly.com/Lists/Posts/Post.aspx?ID=47 For this particular list, I need to parse a text field, split ...
0
votes
1answer
101 views

Use REST or XSL to get a Table with totals

I have a list with items that contains several columns like: Year Month HourCategory1 HourCategory2 HourCategory3 Now I want to create a table that shows only totals of the hour categories: ...
0
votes
0answers
58 views

In SharePoint 2013, adding selected webparts to a page

I have been given an interesting problem to solve. We have a publishing site in SharePoint 2013. Requirement: Every user should able to customize their home page with ease. Load available webpart ...
0
votes
1answer
324 views

Bind ListItemCollection as a DataSource of a DataGridView

I am using SharePoint Server 2013. I am trying to show a list data in a DataGridView in a windows forms application(client application). I obtained the ListItemCollection object related to the ...
1
vote
1answer
157 views

Updating the locale using the Client object model

I'd like to set the the Site Settings -->locale setting to English (United Kingdom) using the client object model. Is this possible? This setting can be found browsing the SP site Site Settings --> ...
1
vote
1answer
124 views

Adding a logo to site and sub-site using the Client Object Model

How do you add the url of a logo for the site and sub site using the client object model. This functionality can be found browsing the SP site. Site settings -->Title, Description, and Icon-->Logo URL ...