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

learn more… | top users | synonyms

0
votes
1answer
31 views

Count of documents based on site column content across multiple site collections?

I have a requirement for a dashboard and wondering how to implement in best possible way. I guess CSOM + REST is the only option Requirement: Have multiple site collections with one Document ...
1
vote
2answers
123 views

Copy Taxonomy Field from one item to another

I use CSOM and I want to copy a taxonomy field from one list item to another. Can someone give me an example of this?
0
votes
1answer
100 views

Include all non-system fields for listItems from client-side

Usually for retrieve information from list without system fields we've use code like this: clientContext.Load(logWorkItems, items => items.Include( item => item["Hours_x0020_spent"], ...
0
votes
2answers
72 views

How we can get the city of current user in sharePoint online

Hi currently i am working on sharePoint online, Where i need to fetch the Current location (city) of the user and on the basis of that i want to get the temperature of that city. using JScript . ...
3
votes
2answers
82 views

How does my app log into hosted Sharepoint (Sharepoint Online/Office365)?

I'm new to Sharepoint generally, and need to write an app which will do some basic file management. First, though, it needs to log in. The documentation I've found suggests that: var clientContext = ...
6
votes
1answer
132 views

(ClientSide) set/update JSlink to CSR files for (all) WebParts, Views, Fields

Working on iCSR.github.io to make CSR development a bit easier. I now want to make it as easy as possible to set the JSlink connections on WebParts, Views or Fields. I have code snippets to do it ...
1
vote
1answer
61 views

HTML Webpart JavaScript works in EditForm.aspx but won't in AllItems.aspx

I have a HTML Webpart with the following code (piece): <script type="text/javascript" src="../../SiteAssets/jquery-1.12.0.min.js"></script> <script type="text/javascript" src="../../...
3
votes
0answers
74 views

SharePoint Client Object Model authentication issue

I am using SharePoint.Client to connect to a SharePoint website. The first time it works, but after that I get 401 : Unauthorized error. using (ClientContext context = new ClientContext(...
1
vote
1answer
239 views

Upload a Folder with Sub-folders and Files Recursively with Pure CSOM?

Can someone please, share a CSOM (C# only) recursive method for uploading a folder with subfolders and files to a SharePoint Online Library? I know about WebDav and FileExplorer, but it's not a ...
0
votes
1answer
35 views

update list from another list using ECMA/client object model?

I have eleven lists list1,list2,..list10.and listDup Now i want to update ListDup's SID column based on List1's SID . when the time of adding item in List1(List2,List3,..List10) i have to check sid ...
2
votes
0answers
81 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
10 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
22 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
516 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
279 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
33 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
42 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
85 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
54 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
44 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
10 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
372 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
1answer
65 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
102 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
93 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
634 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
40 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 ...
4
votes
1answer
147 views

Differing ways to make executeQueryAsync calls (Function.createDelegate)

I want some understanding on two programming patterns I've seen and when to employ them. The question is about callbacks and delegate. In the first code there are two distinct functions, success ...
1
vote
1answer
114 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
198 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/...
1
vote
2answers
195 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
105 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
932 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
594 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
34 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
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 ...
0
votes
1answer
117 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
76 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
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 ...
0
votes
1answer
384 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
65 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
508 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
285 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
236 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
75 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
514 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
2
votes
3answers
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
509 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, ...
2
votes
0answers
151 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 ...