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

learn more… | top users | synonyms

1
vote
2answers
178 views

Creating custom content organizer rule using Client Object Model in Sharepoint 2013

Can we create custom content organizer rules using Client Object Model in SharePoint 2013? If no, then what way of doing it should be followed?
3
votes
2answers
174 views

Object Doesn't support property or method '$1X'

I am using JSOM in Nintex Forms 2013. My script includes are /_layouts/15/sp.runtime.debug.js /_layouts/15/sp.debug.js /_layouts/1033/init.js /_layouts/MicrosoftAjax.js /_layouts/sp.core.js /_layouts/...
0
votes
1answer
95 views

Client Object Model Authentication using SharePoint App permission

I'm developing a SharePoint App that is provider-hosted. Could I access to a site collection using App permission (this means using ProductID and IssuerID and etc) without StandardToken? Usually the ...
4
votes
3answers
21k 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 ...
3
votes
2answers
1k views

Get Parent term set id using JSOM

I want to get parent term set id in SharePoint online using term_parent.get_id(); in below code.I am getting all terms but unable to get parent term id.It is giving me error as Uncaught Error: ...
1
vote
2answers
170 views

JSOM: Fastest way to get count of list items in a view

My current JavaScript implementation is based on answer in How to get all items in a View using Client Object Model (JavaScript). Is there a way to avoid loading the view first? Also, I am not ...
1
vote
1answer
767 views

Uncaught ReferenceError: SP is not defined

I am trying to implement to Sharepoint simple function from MSDN which I've placed in aspx file but I got this error in js web browser console: Uncaught ReferenceError: SP is not defined. Any ideas ...
0
votes
1answer
93 views

Save site as template using client object model [duplicate]

I would like to reproduce the "Save site as template" action with the client object model. Can someone give me a hint how to do this?
1
vote
1answer
501 views

Move a file across site collections with version history

I have the need to move a document using Client Object Model across site collections in SharePoint Online while retaining its metadata and version history. The sp.movecopyutil methods allows us to ...
0
votes
1answer
32 views

The property or field 'Id' has not been initialized

I want to get user ID from client context by looping through groups. I wrote following code. When I run this code I get an exception "The property or field 'Id' has not been initialized. It has ...
1
vote
1answer
2k views

Not able to fetch Term store and related terms using client object model

I want to fetch termstore, Termsets and related terms.However, Iam not even able to fetch the termstore. Below is the error message. TypeError: termStores is undefined termStoresEnum = ...
0
votes
3answers
2k views

How to get termstore GUID by giving its name

I've a term-set called My Term Set, I need to get the Unique Identifier by passing its name. How can i do that? This is the code i have tried so far but it gives undefined Please help me thanks a ...
0
votes
0answers
14 views

Retrieve all users can be added to a web on SharePoint Online

Is there any way to retrieve all users that I can add to a site on SharePoint Online? I want to add some users to a site from a web app that is out of SharePoint. The app has app-only permission(Full ...
3
votes
1answer
14k views

How to retrieve all items from a list (with custom fields) by javascript object model

I need to get all my custom fields from my list by Javascript Object Model.. The code I wrote down is this: var items; $(document).ready(function () { $("[name=ItemChildCount]").text("...
2
votes
1answer
909 views

How can I get a listing of all sites in my site collection using Client Object Model?

As the Site Collection Administrator, I don't have access to the servers to write server side code to get a listing of all sites in my site collection. I can write sandbox solutions in SP2010 to get a ...
0
votes
1answer
348 views

Disable “Require Use Remote Interfaces permission” using power shell

I want to disable "Require Use Remote Interfaces permission" of web application using power shell script.
1
vote
2answers
1k views

how to update properties of item in doc set with client object model

I've been able to create doc sets and upload files to it with the client object model. I am having difficulty updating the properties of the files in the doc sets. Here is what I've tried: public ...
2
votes
1answer
71 views

Can get User Department via JSOM or REST (no UPA)?

The farm has not UPA service deployed and I wouldn't do it. Is it possible to retrieve using JSOM or REST one of the properties that we see in the _layouts/15/userdisp.aspx? page for a specific user? ...
3
votes
1answer
596 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 SPSite(...
0
votes
0answers
30 views

Sharepoint 2010 Client Object Model

I have been building an application in SharePoint 2010 using InfoPath and SharePoint Designer. The InfoPath Forms submit to SharePoint Lists. Everything has been going well, but now I need to ...
3
votes
1answer
412 views

How can I increase the allowed execution time for a CSOM Client Context?

I am running SharePoint 2013 and have a Windows app that creates SharePoint sites with CSOM. I have used Powershell to adjust the ClientCallableSettings, lengthening the ExecutionTimeout to 3 minutes....
0
votes
1answer
304 views

executeQueryAsync synchronously in each loop for sharepoint javascript model

I am performing looping in javascript for sharepoint. I want it to perform synchronously, means only after first data execution is done it should start with second. If first data execution is ...
1
vote
1answer
223 views

Assigning Term Store Administrator on SharePoint Online using CSOM

I am trying to setup a SharePoint Online Site Collection 100% programmatically via the CSOM in a .Net application. I have been able to create the Site Collection itself, sub-sites and lists, but I am ...
14
votes
4answers
9k views

Grab a specific property bag using ECMA script

I am trying to grab a key/value pair from a specific property bag but can't find any documentation or example code on how to grab a property bag. Currently I can only seem to grab allProperties. Here ...
2
votes
1answer
817 views

How to move/copy a document set via JavaScript CSOM

Could somebody give a JavaScript CSOM example of how to move/copy a document set from one document library to another? The document set has a derived content type with a list of metadata, and it ...
1
vote
1answer
440 views

Use GroupBy on ListItemCollection using CSOM

I am trying to do a GroupBy on a bunch of items that I have retrieved using CSOM and when I try do a foreach loop to go through them I get method not supported exception. List contactsList = context....
7
votes
2answers
10k views

Get a value included from a lookup column using the JavaScript Client Object Model

Related: How to retrieve a ListItem using the Javascript Client Object Model? In my previous question I was able to successfully retrieve a basic value from a list item. My problem is that I am now ...
1
vote
1answer
473 views

editDocumentWithProgID2 in CSOM

I need to Open/Download Word or PowerPoint Document directly from Provider Hosted SharePoint App. We can perform easily in on-premise using editDocumentWithProgID2 Tried with getting CORE.js, SP.js ...
1
vote
1answer
64 views

Caml query for date range not working in ecma

Not able to get item collection by my CAML in date range, while able to get in simple CAML query. Please any body let me know what is the correct format of passing date string. function ...
1
vote
2answers
2k views

How to check if the file or folder exist in SharePoint document library using client object model?

Is there any way other than looping through the Files to check whether the folder or files exist in document library using clientcontext - client object model.. Can someone confirm me whether the ...
2
votes
1answer
413 views

Error when adding web part or app part via CSOM remote provisioning to SharePoint page: Specified argument was out of the range of valid values

Problem Adding a web part (or app part) via CSOM remote provisioning to a on-premise SharePoint web part page results in a Specified argument was out of the range of valid values exception ...
6
votes
1answer
250 views

How to copy the entire source folder to target folder within same document library using c# and CSOM?

I want to copy the entire source folder to target folder within same document library using c# and CSOM I've folder structure like in Shared documents/Expenses will be the source folder. the target ...
2
votes
3answers
3k views

How to copy the complete folder structure one location to another location include all files and sub folders

I have folder structure like in Shared documents/East using CSOM and C# Main Folder Folder1 Folder2 File1 File2 I have to copy all folders with files to Shared documents/West ....
0
votes
1answer
2k views

Client Context executeQuery() works in console app but returns null object when executed from CRM Server

I have the function GetDocumentLibrary which must return a libray from sharepoint site. When I execute it from a Visual Studio Console Application it works and return the library with all informations....
5
votes
1answer
2k views

System.ServiceModel.ServiceActivationException “A relative URI cannot be created because the 'uriString' parameter represents an absolute”

The client object model code in my application is throwing the following exception. How to solve it?. System.ServiceModel.ServiceActivationException: The service '/_vti_bin/client.svc' cannot be ...
1
vote
1answer
462 views

How to copy documents from one folder to another in SharePoint document library using client object model?

I want to copy documents from one folder to another within same document library along with metadata (retaining metadata from source) using client object model with Microsoft. SharePoint.Client.dll
0
votes
0answers
69 views

Date parsing from JavaScript works for Firefox, not for IE

I am trying to parse a date in my java-script code, which is working fine in Firefox browser but not returning correct results in IE. below is my sample code: var shiftDate=recordArrayItem[i][0]; ...
0
votes
2answers
2k 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 ...
2
votes
2answers
2k views

Remove role from group programmatically, CSOM

I would like to remove the contribute permission level from a specific group. I use this code: Group group1 = web.SiteGroups.GetByName("StudentsKls11"); RoleDefinition readDef = context....
0
votes
0answers
2k views

SP2013 - The object is used in the context different from the one associated with the object

I have a function that initializes a custom taxonomy control, as below (not in myControl.js) function initMyControl() { if (something is true) { var context = new SP.ClientContext(...
3
votes
2answers
2k views

SharePoint 2013 get all Taxonomy terms JSOM

I am trying to get a collection of terms under a term set so I can see which have custom properties. I have been searching for almost a week now and keep coming up with nothing. I found several ...
3
votes
1answer
4k views

How to add Client Web Parts (App Parts) to a page from JavaScript CSOM?

We're working on a custom way of adding and deleting Web Parts and App Parts to a page in SharePoint 2013. We have to use the new App way of developing and all code has to be using the JavaScript CSOM....
2
votes
2answers
3k views

Upload file into Sharepoint Document set

I'm trying to upload a file to a document set which is located in a library. Im using C# and the Sharepoint Client Object Model - Library, but I can not find any documentation to do this task. I ...
2
votes
1answer
475 views

JSOM How to get User Id

When trying to resolve a user with the ensureUser() call, the object is always returned as undefined even though the user exists as a Domain and SharePoint user. //Calling code. var currentCtx = SP....
0
votes
2answers
37 views

How to do a httprequest with some dynamic url clientside, but do not redirect to this url?

I created a custom action with some javascript inside of it. I would like to genereate dynamic some url. Then I would like to do a httprequest to this url. BUT I do not want to redirect to this url, ...
4
votes
3answers
2k views

How to default a Person FormField in New Form Template?

Without using any addons, has anyone discovered a way to set a default value for a <SharePoint:FormField> where the field is a Person/Group? We'd like to default a field on our newform to the ...
1
vote
1answer
334 views

Get a document thumbnail URL using client object model on SharePoint Online

I am working in a SharePoint online based environment and I need to fetch the thumbnail url for a document in a library programmatically, using the .Net client object model (not EcmaScript). Is that ...
1
vote
2answers
7k views

Get Current list item

How to get current (opened) list item using object model. I have a blog which has list named posts. when user opens anyone post, i need to do operation taking that current opened list item. I am using ...
2
votes
1answer
1k views

Copy files/folders between site collection and retaining metadata

I'm using SharePoint 2013 I need to copy files/folders/sub folders from one site collection to different site collection(basically archiving them). I need to do this remotely by using CSOM/JSOM. ...
2
votes
1answer
4k views

Querying for File properties plus ListItemAllFields properties

I'm trying to retrieve both a file's Id in its list, plus its ETag, using the following snippet; using (var clientContext = new ClientContext(webUrl)) { var results = clientContext.Web.Lists ...