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

learn more… | top users | synonyms (1)

0
votes
0answers
204 views

Modify list item field using javascript?

I'm trying to implement some Move Up and Move Down hyperlinks in a list so that, for example, pressing move up moves the item one place up in the list. I have tried giving the list an order column ...
1
vote
1answer
2k views

Convert Image src to base64 [closed]

I am working on Sharepoint 2010, I have create one custom button. when user select any row from list and click on custom button then I have fetch one multiple line column html in one variable name ...
1
vote
0answers
80 views

Sharepoint 2010 - get List IRM properties with client object model

This link here shows you how to get the IRM properties of a list with the sharepoint sdk: ...
0
votes
2answers
1k views

Creating site using javascript object model error: The request uses too many resources

I'm trying to create a site in my sharepoint hosted app using the javascript client object model in a SharePoint online site. I use a custom template when creating the site. This is my code: var ...
0
votes
1answer
173 views

Cannot add aspx file to root folder

Using the Object Model and I'm trying to add a file to the root folder of a document library. The file is an aspx page which links to a file handler control we have. The problem I am running into is ...
1
vote
1answer
119 views

Create external users using CSOM

Does anyone know if it's possible to invite external users with the client object model or is this only possible in the UI?
4
votes
2answers
3k views

Format Date using Javascript Object Model

I am using the javascript object model to get a date field back and display it on a page e.g. oListItem.get_item("MyTestDate") This displays on the page by default as: Thu Jul 25 09:30:07 PDT 2013 I ...
0
votes
1answer
77 views

NotSupportedException caught when trying to create library based on custom template

I am trying to create a library based on custom template type using the following code: using (ClientContext context = new ClientContext(@"http://website.network/sitecollection/site/")) { ...
2
votes
1answer
468 views

Mocking Client Object Model's ClientContext with Moles

I've been tasked with writing a small C# tool to fetch and fiddle with some Sharepoint 2010 items using the Sharepoint Client Object Model (COM). The code will typically have something like this in ...
-1
votes
2answers
126 views

:net contra Javascript [closed]

If do some client programmering, what factors should I take it into consideration if I gonnna use javascript/ECMAScript or .net in relation to retrieve some functionality from SharePoint and apply it ...
2
votes
2answers
3k views

SharePoint client model and setting up lookup field

I have list A with "Title" column which is lookup column to List B. I need to update existing List B documents so that they will be linked to List A. However, SharePoint client context doesn't accept ...
0
votes
1answer
52 views

Load libaries given subsite name in clientapi

Hi I'm fairly new to the sharepoint client api, but I'm trying to get the libraries given a site name. My clientcontext in my class is at the root of my sharepoint e.g. https://mysharepoint.abc.com ...
1
vote
1answer
668 views

Javascript : How to handle version conflict errors when using javascript COM?

so I use quite a bit of the javascript client object model for CRUD operations to lists from custom pages (inputs) and I have found that I get version conflict errors on saves from time to time....its ...
0
votes
1answer
334 views

Javascript Object Model REST/AJAX: does callback/resulting function have access to the id of newly created item

so if I use rest like method to create a list item in javascript, can I get the id of the newly created item in the callback/result function? function createNewRecord(url, body, callback) { ...
3
votes
2answers
859 views

How to Get your manager with Javascript

I want to get the user's manager using Javascript Client Object model. How can I do this?
3
votes
1answer
503 views

How to make a request to SharePoint 2013 REST service from code that runs inside SharePoint server (NOT from App/External code)

I have a page hosted in _layouts in SharePoint 2013. I want to make REST call to SharePoint REST api from this page using current user credentials. I don't want to do it from client-side (jquery etc) ...
1
vote
4answers
5k views

get the login name of the current user using javascript

var context = new SP.ClientContext.get_current(); this.website = context.get_web(); this.currentUser = website.get_currentUser(); alert(currentUser); i tried this code, but i got an ...
0
votes
1answer
1k views

Jquery is not working on sharepoint date time control

Hi In my application page i have a sharepoint datetime control. I am using jquery on text changed event to calculate the number of days and displaying in a text box. Now i want to fire the same event ...
3
votes
2answers
14k views

Get current user in Client Object Model with javascript?

var ctx = new SP.ClientContext.get_current(); var web = ctx.get_web(); ctx.load(web); var user = web.get_currentUser(); alert(user); I used above code to get the current user using JavaScript, but I ...
0
votes
1answer
80 views

Retrieve notifications with JavaScript

I want to incorporate social feed into my SharePoint webpart. I followed this tutorial: Code example: Retrieve social feeds by using the SharePoint 2013 JavaScript object model. Even if I used ...
1
vote
3answers
457 views

SP ECMA/JS get_siteUsers() not working? trying to get user with getByLoginName()

I am trying to get specific users with this line using ECMA but I keep getting error: this.oUser = cxt.get_web().get_siteUsers().getByLoginName('dev\\joe'); I keep getting property or method ...
4
votes
2answers
1k views

SP JSOM: is there any way to get the group by name instead of getById(10)

is there a way I can use the below with something like getByName(thisGroup), instead of getById(10) in SP 2010 jsom: function setSomeUsers(dataObj, projGroup) { var clientContext = new ...
1
vote
0answers
219 views

SP2010 JSOM: error when trying to get all users of specific group using javascript

having trouble getting users return from specified group using javascript per this on MSDN var siteUrl = '/sites/MySiteCollection '; function retrieveAllUsersInGroup() { var clientContext = new ...
0
votes
1answer
313 views

SP2010 JSOM: possible to automate breaking inheritance of item, and controlling role assignment using javascript

i am working on a custom system I am building into a site that allows various reps, of various departments to enter project information and many different aspects of related data (children) into the ...
0
votes
1answer
87 views

ecmascript/javascript to check current status of timer job

I want to show sharepoint notification when user opens a list form using oob. I am basically doing some sync with external list and sharepoint using timer job. For this i want to check if a specific ...
1
vote
2answers
571 views

Retrieving the Name of a Document Saved in a Document Library Using the Client Object Model

foreach (SPListItem item in listitems) { String value = item.File.Name; } The above sever side code shows how to retrieve the name of a document which is saved in a SharePoint document ...
1
vote
2answers
525 views

Access denied, from an app, when getting List items from a different web applcation

I have create a SharePoint Hosted App and installed on a Site which is located on WebApplication1. This app tries to get list items from a list in a site which is located on Webapplication2. I have ...
1
vote
0answers
181 views

Update value of column in Form Library using CSOM

I want to update the value of a promoted field from infopath form by csom code. I have written the following code but it does not seem to work. Please guide to know what is incorrect. function ...
0
votes
0answers
103 views

Copy list item and add it to the same list by copying their ID using ecma script

I need to Copy a list item which is selected and add it to the same list using ecma script..no workflow and designer is allowed(only client object model). I tried to copy the list items but i havent ...
0
votes
1answer
375 views

Get ListItem ContentType and Metadata values at a specific version

I'm trying to figure out a way, using the Sharepoint Client Object Model, to get the content type and the metadata values of a listItem at a specific version. I can get the different versions using ...
2
votes
0answers
233 views

ssl certificate error when using Client object model

I wrote an app that gets information from some Sharepoint 2010 lists and displays it to the user. It works fine on my development machine.But when I copied the exe to another desktop machine i got the ...
0
votes
1answer
1k views

Why, on occasion, does executeQueryAsync() fail to execute success OR failure method?

My intent is to dynamically create a grouping of EditControlBlock (List Item Menu) custom actions for two different list view pages. Upon loading the Active page, all custom actions are destroyed, ...
1
vote
1answer
7k views

How to reterive list item values using CAML query?

I have one Date and time column and text colum. I need to retrieve list item value based on this both column using CAML query.. For ex: Columname---> Date value for date would be-6/1/2013 and ...
0
votes
1answer
553 views

Exception when trying to execute query on large library from client object model

I have a document library with ~50,000 documents in it. I have a Client Object Model query which retrieves the ListItems in the document library. This query previously worked when the document library ...
0
votes
1answer
118 views

SP2010: possible to override styling of the upload aspx dialog from calling parent page

This may be a silly question, but I am wondering if it's possible to override styles for the upload.aspx dialog to customize the look...not from the upload pages content but form the calling 'parent' ...
3
votes
1answer
232 views

Bug? 2010 Document Sets via Client Model shown as folder

I got a frustrating problem: When I create a document set via Client Object Model, the document set is created as intended as far as it concerns the appearance outside the treeview. It's shown as ...
1
vote
1answer
955 views

SP2010 JSOM: updating with CAML where clause

So I learned and have used the following to update a list item by ID using Javascript Client Object Model: function updateItem(passedID) { var ctx = new SP.ClientContext.get_current(); var myList = ...
0
votes
1answer
251 views

How to get the list item column values based on the html drop down and display in the alert box using Javascript?

I have a html dropdown list(team name) which contains three values A,B,C I have a sharepoint 2010 List A which contains Team name and Email. List A Teamname Email A A@test.com B ...
0
votes
2answers
576 views

How do I delete potentially many items from more than one list using JavaScript?

I'm trying to use a script to remove multiple list items from multiple lists. I'm using Javascript because I don't have access to Visual Studio. The idea is there's a Parent List item in a ...
4
votes
2answers
2k views

SP2010 REST API from Javascript: how to set multiple fields to filter on in the URL

weird but i can't figure this out or find a solution anywhere.... I want to filter on two values on a GET in REST URL from javascript. So since this is from ECMA I am just using filtering in the ...
3
votes
1answer
447 views

How can i add multiple items to a lookup

I have a CSOM console app that uploads files to a library, then it creates a lookup field in another list and also adds lookups to the files in my library. The following code adds a single item in ...
0
votes
1answer
123 views

Possible to upload to a style library remotely using client context?

As title says. I have a win forms app that connects to a remote SharePoint instance using the client context. How can I now, programmatically, upload a file to this style library and what permissions ...
1
vote
0answers
239 views

How to get the distinct values from sharepoint list using GetListItem and bind to dropdown?

I am Passing the XML for getting List item and binding to dropdown. Here i have shown the code.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...
0
votes
1answer
162 views

Anonymous Users and managed navigation

I have a custom javascript that builds an extra navigation menu from a Managed Navigation termset. Currently this is using JSOM and is great - when a user is logged in. The problem is anonymous ...
2
votes
1answer
3k views

Get List Items using ECMAscript CAML query

Hi can anyone show me how can I retieve list items based on 2 fields using ECMAscript CAML? I have a list where I have uid as number and city as text. I want to retrieve all items where uid = 100 and ...
2
votes
0answers
188 views

Dynamically Setting a List View on a WebPart Page

I have been unable to load a page showing a dynamicaly selected View. I can not just display the List itself (Although this would allow me to specify the View in the URL) because I need to modify ...
0
votes
1answer
250 views

Any way to access organisational data?

I would like to access the data that feeds the 'organisation chart/structure' web part in SP 13 online. Preferably JavaScript. I can't find any reference to any part of the api that would allow me to ...
0
votes
1answer
22 views

COM ListItem not updating

ClientContext cl = new Microsoft.SharePoint.Client.ClientContext("http://" + "mysharepoint" + "/" + SubWeb); System.Net.NetworkCredential cred = new System.Net.NetworkCredential("myuser", "mypass", ...
3
votes
1answer
273 views

Is it Possible to create Client Web Part enum property dynamically?

I am creating an SharePoint Hosted App using CSOM technology. I want to set the ClientWebPart Property dynamically. I want to add enum property Dynamically. App will bring all the list name from my ...
0
votes
1answer
349 views

502 DNS lookup failed error when using SharePoint 2013 CSOM

I am facing an issue while using CSOM in SharePoint 2013. I have configured an alternate access mapping for our site to run on http://mycustomdoamin.net/ The site is running fine and I am able to see ...