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

learn more… | top users | synonyms

1
vote
2answers
19 views

“The formula refers to a column that does not exist. Check the formula for spelling mistakes or change the non-existing column to an existing column.”

I am trying to create calculated column using csom. var fieldXml="<Field Name='calctest' DisplayName='calctest' StaticName='calctest' Type='Calculated' Required='FALSE' ColName='sql_variant1' ...
3
votes
1answer
1k views

Retrieve Multi-line Text Field with Append Changes in CSOM (Javascript)

I have been looking for an answer to this question all morning and i cannot find anything to point me in the right direction. We have several customizations to a SharePoint page which displays list ...
0
votes
1answer
25 views

Add Webpart to a Page using only Javascript?

Is it possible to add a webpart to a page using Javascript. I want to add a webpart to a specific page whenever a button is clicked.
0
votes
1answer
31 views

Set Welcome Page using Javascript only?

Is it possible to set the Welcome Page of a SubSite using only Javascript? I'm looking to create an Onclick Event that does this. Anything would help.
0
votes
3answers
593 views

Stop workflow associated to a list via JSOM

I want to stop a workflow when user clicks on the Cancel request button. To achieve this I am trying with the JSOM code. My code as follows SP.SOD.executeOrDelayUntilScriptLoaded(function(){ ...
0
votes
0answers
24 views

Client context is not working with ajax

I have an application where a sub site in SharePoint will create automatically by entering name, description and custom template id. I already have a working application, but the same application is ...
0
votes
1answer
745 views

SharePoint 2013 External Content type. Populate secondary fields

I am trying to migrate data to a document library that contains a external content type using the SharePoint 2013 client object model. The external content type is pulling from a sql server 2012 ...
0
votes
3answers
2k views

Add hyperlink to Sharepoint list item

I need to add a hyperlink to the Sharepoint (2013) list item in one of the columns or make the list item itself as a link. I don't know how to do this. Any help is appreciated!
1
vote
1answer
675 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
1
vote
1answer
1k views

consuming external web services(https) in share point hosted apps resulting cross-domain issue

We are not able to consume external web services deployed in a separate domain from sharepoint hosted apps,using jquery ajax.
1
vote
0answers
455 views

How to load Group.Owner properties using CSOM

When I try to load owner = TargetSite.Web.EnsureUser(grp.Owner.LoginName); I got the exception : The property or field has not been initialized. It has not been requested or the ...
0
votes
1answer
18 views

Checking whether a sub site exist in site collection using client object model

I want to check a sub site exist in site collection. I site exist a new one will be created.This is what I have tried: int siteLanguage = 1033; //Create a new ...
1
vote
1answer
1k 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
647 views

current user is always is administrator on a SharePoint App

I have tried following solution to check the current user's permissions on the current host web in a SharePoint hosted app, however the user is always administrator. function sharePointReady() { ...
5
votes
1answer
656 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 ...
6
votes
4answers
14k 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 ...
1
vote
2answers
794 views

CSOM caml query list view lookup threshold

I have a list with about 15 managed metadata columns in it. Now I want to query that list using CSOM. I don't want to retrieve all the columns values so I limited the column values retrieved by using ...
2
votes
1answer
2k views

set multiselect lookup column using jquery

I have a Multi select Look up column which as you all know is a control with two list boxes and "Add or Remove" Buttons. The user populates the right-hand side of the control with some values by ...
5
votes
4answers
963 views

SP O365 upload big file via CSOM

Hi I try to upload large files (900 MB) to SP Online (actually the OneDrive Business) but seems to follow SP style. Tried this via CSOM and powershell 70 MB are fine but when I try 900 MB a timeout ...
2
votes
1answer
895 views

File Not Found. in ClientContext.Site.OpenWeb

I just tring to open the subsite using the CSOM. I'm geting the below error in clientContext.ExecuteQuery(). site URL is https://xxxxxxxx.sharepoint.com/Customer Orders File Not Found. ...
2
votes
2answers
5k views

Specify item fields to Load using Sharepoint 2010 Client OM

How can I dynamically generate/specify a list of item fields I want to load when querying a list using the Client OM? This is possible to do using the tag on the CAML query, but this loads additional ...
8
votes
2answers
3k views

Retrieve site collection quota and used storage from REST or JSOM

Is there a way to retrieve the amount of storage used and the quota limit for the Site Collection using the JSOM client or the REST web services?
0
votes
1answer
1k views

How to get all users From Owners Group in SharePoint 2013 for a subsite

I am trying to get all the Users from a SharePoint Owner's Group for a subsite. Below Script is Working fine . But it displays both Site and Subsite Users of Owner's Group. For example If SITE A has ...
1
vote
1answer
964 views

List exceeds threshold. query large lists

I have a list that exceeds the 5000 threshold. total is 16013. Is it possible to query lists of this size. I can get all of contents with no query in batch using query..ListItemCollectionPosition ...
3
votes
3answers
2k views

How to create List and libraries with CustomSchemaXml property using SchemaXml with CSOM in sharePoint online2010?

How to create List and libraries with CustomSchemaXml property using SchemaXml with CSOM in sharePoint online2010???? I am using following Code... // Create new list for restore List Item from List ...
0
votes
2answers
27 views

How to attach documents to list items SharePoint 2013 - Microsoft.SharePoint.Client (Error System.IO.FileNotFoundException)

I have a custom list and i'm using the below.But getting error: Could not find file 'c:\windows\system32\inetsrv/Filename -System.IO.FileNotFoundException if (FileUpload1.HasFile) { ...
0
votes
1answer
15 views

SharePoint 2010: Add GroupBy to existing list view using JSOM?

Is it possible to modify an existing view, more specific adding GroupBy, using JavaScript / JSOM? I am creating the library using JavaScript and I'd like to add a GroupBy in the "all items" default ...
0
votes
3answers
30 views

What is the list template type of an asset Library in SP2010?

I would like to know the list Template ID for an asset Library. Here is a link that list the template type enumeration available for all kind of lists and libraries... but nothing about the asset ...
2
votes
2answers
666 views

List Item file attachment using ECMAScript Object Model

How to simply upload & attach file to listItem using Javascript? And how to get/download attachments.
2
votes
3answers
852 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 ...
14
votes
2answers
1k views

REST and CSOM much slower than List Web Service

lists.asmx = Web Service listdata.svc = REST API client.svc = CSOM Using JavaScript to query a list using the 3 available APIs, I'm finding lists.asmx responds much faster than listdata.svc or ...
8
votes
3answers
5k views

SharePoint 2013 Call the REST API from SharePoint hosted app

I've successfully deployed a SharePoint Hosted App to Office 365 and my local on premise installation. All the app aims to do is call the REST API for the user profile manager to get the profile ...
1
vote
1answer
106 views

Remote event receiver setting LastModifiedBy to “SharePoint Program”

I have a Remote Event Receiver, on a list, that fires every time an item is updated, and it works fine. However the Last modified by-field on the item is set to SharePoint program. I have tried ...
1
vote
1answer
557 views

How to stop execution after exception in ExecuteQuery

I have a Remote Event Receiver attached to a list on my SP web and code that then runs on the ItemUpdated event: var web = clientContext.Web; var site = clientContext.Site; var list = ...
4
votes
1answer
712 views

Get before properties in ItemUpdated event via CSOM in a RER

Can I get the before properties in item updated? I need to check if a field changed its value, between the previous and the new value in a RER with CSOM. The following code tell me the ...
6
votes
3answers
5k views

How do we create Sub Site using JavaScript object module

My using following script to create Sub site. <script src="//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js" <br/> type="text/javascript"><br/> </script><br/> ...
12
votes
5answers
56k 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 ...
4
votes
6answers
23k 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 ...
1
vote
3answers
54 views

CSOM error with SP.SOD.executeFunc used twice

I'm trying to do several CSOM requests. But I can't do it. Here is my first, that works alone : var collListItemToBeUpdatedRevente = ""; var enumeratorRevente; var ...
1
vote
2answers
928 views

How to get all the sharepoint 2013 site groups using C# client side object model

How to get all the SharePoint 2013 Site Groups using C# Client Side Object Model I am using VS 2013 on my laptop and SP 2013 is on the network I read that I have to use Credentials or equivalent ...
3
votes
1answer
1k views

Extract text from document in a SharePoint 2013 library

I would like to extract the text from documents stored in a SharePoint 2013 online Document Library. I have the document loaded using: ClientResult<Stream> data = file.OpenBinaryStream(); ...
1
vote
0answers
344 views

401 when authenticating against SharePoint Online

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 CSOM objects ...
1
vote
1answer
39 views

SharePoint JSOM and Promises - copying items from one list to another

I need to use JSOM to copy a set of items (found from a CAML query) from one SharePoint list to another. I'm pretty experienced doing this type of thing on the server side, but relatively new with it ...
1
vote
1answer
2k views

SPServices - GetRolesAndPermissionsForCurrentUser

I have a list where one group of users is not allowed to delete items but they have view and edit permissions. All items in the list contain an attachment. However, users are not allowed to delete the ...
4
votes
1answer
11k views

Properties when uploading Files using REST in SP 2013

After a lot of research I finally got uploads via REST working in SharePoint 2013. But I would like to provide additional properties to the Add Function like Title. This code works so far but the only ...
0
votes
0answers
38 views

Copy list item value to another in SharePoint using REST API

I am trying to auto increment a value for a specific column in SharePoint list. How to copy list item ID value to another column of of a SharePoint list (e.g ProjectID). I tried this code ...
5
votes
3answers
3k views

How to get caml query to return list items created by the current user?

I want a caml query that only retrieves items created by the user currently logged in. I tried this specifier = "<Eq><FieldRef Name='AssignedTo'/><Value ...
12
votes
6answers
16k views

List API get all items limited to 100 rows

When doing a GET call to the List API from JavaScript: "/_api/web/lists/GetByTitle('ListName')/items" the results returned are limited to 100 rows. Is there any way to return more rows in the result, ...
0
votes
1answer
28 views

How to edit SharePoint page content/URL using client Object Model

I have SharePoint Site on SharePoint online with Pages library having 5 pages with content. Need to modify the URL in the pages programmatically using Client Object Model suppose I have Newname.aspx ...
0
votes
1answer
640 views

Taxonomy control in SharePoint hosted app

I am creating an SharePoint hosted app. In that I have to use Managed MataData from my list. In this I am getting the Metadata from my list column to my Taxonomy control. I have find some post but I ...