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

learn more… | top users | synonyms

2
votes
0answers
11 views

SP.ClientContext.Load suddenly throwing uncaught TypeError?

I am trying to start a workflow from JSOM. I just had it working fine, and then I had to change some of the other code in the JavaScript file that is unrelated to the client context or executing ...
0
votes
0answers
6 views

Custom Contenttype data being erased on document check in

I have a process that checks out a document, alters the document, saves a new file with the altered data, and then checks in the document updating the document content with the new file that was ...
0
votes
0answers
8 views

Refreshing a lookup field in modal edit form via client side javascript

I have a list (list "Project") that on edit of a item opens a modal dialog for editing (editProject.aspx) The Project item has a lookup field "Document links" which points to a custom sharepoint list ...
0
votes
1answer
63 views

c# sharepoint 2013 client object model list item attachment update Error: version conflict

my requirement is i need to update the list item values and if list item contains attachments i need to override with the attachments, delete unused attachments from list item. when i am trying to ...
3
votes
3answers
63 views

Cannot contact site at the specified URL on try ClientContext.ExecuteQuery();

I try to get list from remote SharePoint server using CSOM in .NET Web Application, but ClientContext.ExecuteQuery() return exception Cannot contact site at the specified URL If I try to get ...
2
votes
0answers
26 views

Desktop application needs to support all versions of SharePoint and SPO

I am connecting to the different SharePoint environments using the CSOM. Whats the best way to deploy the available DLLs to support all SharePoint environments? Do I need to dynamically instantiate ...
0
votes
0answers
10 views

Difference between GetFileByServerRelativeUrl and GetFolderBy… when moving file/folder

I've been trying to create a method that would move a file or a folder. To get the file that I want to move, I am using Web.GetFileByServerRelativeUrl and then on the returned file I invoke MoveTo ...
2
votes
1answer
43 views

Javascript object model says load succeeded, but object is empty?

I've got a pretty weird issue going on on a clients SharePoint 2013 environment. We're using some JSOM javascript code to retrieve details from a web. Here is a snippet of the code: function ...
0
votes
0answers
20 views

How I can use SCOM to create a dashboard for SharePoint health monitoring?

I want to create a dashboard with the help of SCOM 2012 to monitor SharePoint multiple farm health. Can someone give me some ideas or suggestions or any reference how I can start and proceed further.
1
vote
0answers
26 views

Save a SharePoint 2013 workflow as template using code behind

We have around 100 SharePoint 2013 workflows in our Farm. We need to save these workflows. It is tedious to manually open Sites in Designer and go to each workflow and store it as a template. Is there ...
0
votes
0answers
8 views

Is there a way to get the IDs back in response of newly created documents when uploading multiple silverlight control

I need to provide the ability to allow multiple documents at once while allow for a couple of parameters as meta. So is there a response body object that comes back from the server when using the OOB ...
1
vote
2answers
61 views

Fetch value of people picker column using javascript - SP2010

I'm using a function to grab the id from the url of the record and fetching numerous field values successfully. It seems to work fine for all fields except for people pickers. When I display the ...
5
votes
0answers
36 views

Migrate recursive checkbox of calendar from sharepoint 2007 to 2013 programatically

I am trying to migrate SharePoint calendar from 2007 to 2013 programatically. Here is my code. using (ClientContext clientcontext = new ClientContext(targetURL)) { clientcontext.Credentials = ...
1
vote
1answer
68 views

executeQueryAsync don't behave as synchronously

I am creating different forms where I need same functions, so I created separate js file which I call on my each forms. In below code if alert currentUser from success method then I get the value but ...
1
vote
0answers
39 views

How can we programmatically add a hyperlink and text to a multi-line text field?

I have a SharePoint list which has a multi-line text field. Can we add a hyperlink and simple text along with it, inside that particular field using the client object model? If so can someone help me ...
0
votes
3answers
75 views

Issues with Minimal Download Strategy and _spBodyOnLoadFunctionNames.push

I noticed that on the sites that have MDS activated, functions that I queue up with _spBodyOnLoadFunctionNames.push do not get executed. I can step through my code and I see ...
1
vote
1answer
23 views

Add user to group error - Code

I am getting an error when trying to add a user to group in JavaScript, here is my code below: user = web.ensureUser("domain\\natalie"); membersGroup = web.get_siteGroups().getByName("site ...
1
vote
0answers
36 views

Unable to get the DisplayName of feature using CSOM

I am trying to get the names of all the features available at site collection using CSOM. Below code works fine to get list of all the Features but i am unable to get the DisplayName property. ...
3
votes
2answers
52 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 ...
1
vote
2answers
84 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 ...
0
votes
1answer
33 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
106 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 ...
1
vote
1answer
120 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
20 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 ...
0
votes
0answers
12 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 ...
0
votes
1answer
47 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 ...
2
votes
1answer
45 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? ...
0
votes
0answers
26 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 ...
0
votes
1answer
52 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
41 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
1answer
140 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 ...
6
votes
1answer
76 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 ...
1
vote
1answer
107 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 ...
0
votes
0answers
36 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]; ...
1
vote
1answer
114 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
2answers
407 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
268 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 = ...
0
votes
2answers
26 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, ...
2
votes
0answers
112 views

Activating a Web-scoped Feature using SharePoint 2010 CSOM fails with ArgumentException on featDefScope

I'm trying to activate a Web-scoped feature using the Client Object Model in SharePoint 2010. The code works when activating a feature in SharePoint 2013, but when run against SharePoint 2010, I get ...
3
votes
0answers
36 views

Handling concurrency in SharePoint Client Object Model

I'm currently working on an enterprise portal built completely using provider hosted apps, ECMA CSOM and .NET client object model. We are almost at the end of our development phase and we started ...
0
votes
1answer
142 views

CSOM - Incorrect Usage of Exception Handling Scope

I am trying to use ExceptionHandlingScope in a basic Managed client side crud I am getting the error - Incorrect Usage of Exception Handling Scopes namespace ConsoleApplication1 { class ...
1
vote
1answer
67 views

How to change “Who can view the membership of the group” Group Members to Everyone through csom javascript

I was wondering if it's possible to alter a setting of a group such as Who can view the membership of the group? Setting from Group Members to Everyone through CSOM or through SP's web services. ...
1
vote
2answers
93 views

How to control the order of my javascript logic in my display template?

I have created a custom item display template. In this custom item display template I try to check if the current user has contribute permissions to the item. The item is an sitecollection. If the ...
0
votes
1answer
41 views

Cascading dropdown with long texts(string)

I have a scenario where on selection of service, I am filling services description drop-down, which is working fine. But, since the description is having lengthy texts it looks really ugly. Is there ...
1
vote
2answers
75 views

Can webparts be added using the client side object model?

I have found loads of guides showing how to do this, but none if them show how to do it using the client side model. This should do what i want, but its using the server side model and not the client ...
5
votes
3answers
911 views

Get list item url javascript object model

This is such a simple question I thought that it would have been answered somewhere else (but can't find a clear answer).... How do I get the list item url using the javascript object model? I'm ...
1
vote
0answers
83 views

How Do You Edit Pages Using The Client Side Object Model?

Im using the C# CSOM object for Sharepoint 2013. I want to edit the homepage of a site so i can add some custom content to it. I want to be able to add some custom text and some web parts in the ...
0
votes
1answer
104 views

Is it possible to duplicate a subsite using the C# client side object model

I need to create a large amount of sub sites. Each one will be the exact same to support various products. I have code written already to create a subsite and add the apps to it, but its proving to ...
0
votes
0answers
37 views

Performance Optimization when loading Termsets

I have a problem with retrieving the terms of a termset in my program (which is written in VB). The termset has about 300 terms, and all of them have about 10 to 70 subterms. I wanted to integrate all ...
0
votes
0answers
39 views

How do use JS to Query and Display a Calendar View

I am customizing an intranet site with SharePoint 2013. I created a Calendar App and want to query the view and display it in a customized HTML/XML webapp that will be used with other data/content. ...