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

learn more… | top users | synonyms (1)

3
votes
1answer
562 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
652 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
394 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
347 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
191 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
2answers
434 views

Call executeQueryAsync method second time gives first time result

In the code I tried to get the data from 2 different lists. 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
300 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
567 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
86 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
211 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
60 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
335 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
166 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
134 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 ...
0
votes
2answers
1k views

Using REST API to get Site Groups in SP 2013

I'm trying to use the REST API in SharePoint 2013 to get the site groups. I've been using this link for a little help... http://msdn.microsoft.com/en-us/library/jj245927.aspx It's to do it with the ...
1
vote
2answers
2k views

Get all subsites of top level site using JavaScript OM

I am trying to get all sub sites of the top level site. However, the code I wrote for the app returns zero subsites. I am a little mystified as to why: var context = SP.ClientContext.get_current(); ...
0
votes
0answers
135 views

Trying to get all selected items from a list

Im trying to get all items selected in a list but unable to do so with the code below: getItem = new TextBox(); getItem.Text = "get item"; getItem.Attributes.Add("onkeyup", ...
4
votes
2answers
687 views

Programatically setting Site Collections Administrators in SharePoint 2010 using Client Object Model

I am writing a program where I want to be able to add/remove user/groups as administrator for a given Site Collection. I am using Client Object Model API for SharePoint 2010. I havent been able to ...
1
vote
3answers
5k views

How to authenticate user in sharepoint online using javascript

I have one sharepoint online 365 site. In that one public site will be there. In that there is sign-in option. Generally When ever user clicks on signin it will redirect to microsoft login page. But i ...
0
votes
1answer
198 views

JavaScript OM to Approve Designer Workflow Task

I have a SharePoint Designer 2010 approval workflow and I am attempting to approve the tasks via JavaScript Client Object Model. I am able to change all of the fields to "Completed"/"Approved" but the ...
2
votes
0answers
133 views

Change content type order via Javascript/ECMAscript

In my SharePoint-hosted app, I use javascript to apply a content type called "Order" to a list in my app. When users click "new item" to upload a document, I want that document to derive from my new ...
1
vote
1answer
464 views

How can I get a list of all user alerts set on a site collection in SPO?

I need to retrieve a list of user alerts set on a particular site collection in SharePoint Online. This is possible through the web UI under Site Settings -> User Alerts, but requires that I choose ...
0
votes
1answer
2k views

Add an existing WebPart Using the Sharepoint client object Model [duplicate]

My knowledge of the Client Object model is fairly limited, although I have been able to remove and move existing web-parts on a particular page. But I'm now struggling to find and then add a custom ...
0
votes
1answer
199 views

Sitemap with site owners using jquery/javascript

I am having scenario where i need to create site map webpart using jquery or javasscript i want to show all the subsites and their owners of each site with hieracrchy .can anyone help me in ...
1
vote
1answer
355 views

Load page error when I use ScriptLink in the page head

Here is the beginning of my custom SharePoint Application Page: <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, ...
1
vote
0answers
499 views

Javascript in CEWP queries a list every time dropdown is changed on NewForm.aspx not working

I am trying to apply javascript in a CEWP to a NewForm.aspx page of a simple custom list. Basically, the idea is to auto-populate a text field on the new item form whenever a dropdown column's ...
1
vote
3answers
4k views

SharePoint COM - SP.ClientContext(siteUrl) - Object doesn't support this action

Using the SharePoint COM to update a list item, but my function is failing. function updateProjectEC(projID, totalEC) { if(totalEC !== 0) { console.log("projID: " + projID); ...
1
vote
2answers
1k views

Upload to DocLib with jQuery (and REST) without HTML5

Uploading Documents to SP 2013 with jQuery and REST work just fine (Properties when uploading Files using REST in SP 2013) but these methods require a HTML5 compatible browser. The problem is now I ...
1
vote
1answer
333 views

How to programmatically check if the current sharepoint user name and password?

Hi, i am using client object model in c# win form. How to programmatically check if the current SharePoint user name and password is correct? here I log in using SharePoint Site URL, username and ...
1
vote
1answer
380 views

Create C# web service that returns SharePoint ListCollection

I want to create a WebService that returns the SharePoint ListCollection in JSON format. I have tried by using following code: ClientContext ctx = new ClientContext("mySite"); ctx.Credentials = new ...
3
votes
2answers
446 views

Creating a SharePoint Wiki Page via JavaScript and REST or CSOM

I'm fairly new to developing SharePoint 2013 Apps, and I was tasked to customize the Create New Wiki Page for a Site. The user has to type in the Title, I do some processing, and then when everything ...
1
vote
1answer
96 views

Adding list items using the Client Object Model

I'm currently working on a Windows application to be used to migrate data from a legacy system into a SharePoint list. To do this I am accessing the Client Object Model and using it to create new ...
0
votes
1answer
60 views

RemoveUserFromSite failing (500 Internal Server Error)

I've created this function to delete a user from my site collection. function removeUserFromSite(){ userHTML = $('#my_SiteUsers option:selected').text(); //check if default user selected ...
0
votes
1answer
469 views

SharePoint Apps Getting the GUID of App-Provisioned List using JavaScript and CSOM

I'm a Sharepoint App beginner. I have a SharePoint 2013 App that provisions List. How can I get the GUID of those list using CSOM and JavaScript? Here's what I got so far: var lists; ...
0
votes
0answers
109 views

Trying to get list of groups a user belongs to

I came across this post showing how to create a permissions management webPart using SPServices. I tried to do it in SP2010 but keep getting error " User not found". I think it has something to do ...
1
vote
0answers
134 views

Default.aspx (Reference Error: AddItem is not defined)

So I'm trying to push through learning how to code in the SharePoint environment. I created a script in a text file that i'm calling through a content editor webpart. When I debug the page using ...
0
votes
1answer
125 views

Sharepoint 2010 Javascript Client OM, get user data (not current user) via javascript object model

There are plenty of examples of getting the current user via javascript object model in SharePoint 2010, but I am looking for help with getting any users email/title when I have the loginName. There ...
1
vote
1answer
913 views

Add user to sharepoint group

I want to add a user to SharePoint group (in another site collection) using JavaScript API. Here's my code var clientContext = new SP.ClientContext("https://MYURL/sites/dev2/"); var ...
0
votes
2answers
607 views

How to get the current SharePoint client context site?

i am using C# windows application. i want to access the SharePoint site to client Om. Normally we are using, ClientContext objContext = new ClientContext("//Sharepointsite"); but my question is ...
3
votes
3answers
4k views

How to use “SPContext.Current.Web.Url” in client object model?

When working with server side code we can use the following line to obtain the url of the current web site: var url = SPContext.Current.Web.Url; How can we do the same when working with the client ...
2
votes
1answer
349 views

Difference between GUID and UniqueId

What is the difference between GUID and UniqueId? They are both globally unique ids and from the client side we can see they are not the same: ctx = new SP.ClientContext(); web = ctx.get_web(); list ...
0
votes
1answer
529 views

How to utilize audience targeting with javascript?

Im creating a SharePoint-hosted app (restricted to use client side code only), and I want to retrieve documents from a library. Each document have a Target audience field. I want to, in javascript: ...
2
votes
2answers
310 views

How can one create a custom list in JSOM based on a custom list template (STP) in 2013?

I have a custom list template (STP) in my list template gallery. I can retrieve the list template using the client object model in javascript. But it's not clear how to create a new list from that ...
0
votes
1answer
566 views

Can Event Receiver be used in Sharepoint Client Object Model 2010?

I need to e.g detect in a console application any updates that affect items in a SP list. Thanks!
1
vote
1answer
1k views

Update list column using client object model code in SharePoint 2013 goes in onFailure without giving errors

I am using javascript to write the client object model code in SharePoint 2013. I want to update a column of the form library but I am not able to do it. The code goes in the onFailure method without ...
0
votes
1answer
95 views

Custom newfrom (upload a picture and fill in the picture url)

I have to customize an announcement list new and edit form. In the form is there is a Picture Colum. But I don’t want the user to go first to a picture library, upload the picture, copy the picture ...