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

learn more… | top users | synonyms

0
votes
1answer
447 views

new SP.ClientContext(siteUrl); — Object does not support this action

var siteUrl='sites/mysite'; function wait(){ var clientContext = new SP.ClientContext(siteUrl); ....more code.... } SP.SOD.executeFunc('sp.js', 'SP.ClientContext', wait()); ERROR: ...
0
votes
1answer
107 views

CAML Query works in U2U CAML Query Builder, but not SharePoint

I built a CAML query using U2U CAML Query Builder and it works when I execute it in the builder, but when I go to JSOM in SharePoint, I get the entire list and none of the filters from the query work. ...
0
votes
1answer
59 views

Formatting CSOM output

I have a list and using CSOM to surface information. However all the examples I found show an alert box or Gridview to output the information. I would like the list items to show in a tabular form, ...
0
votes
1answer
87 views

Sharepoint Online Public Website Forms

I have several forms that need to be sent to an email when filled. How do i do this to enable anonymous users to do that, It only allows authenticated users to submit the form via JSOM
0
votes
1answer
48 views

why all documents are imported in check out

I've an issue with an import of documents in client object model. My import run correctly an imported my documents not check out and after 12h, every documents arrive check out. I changed nothing in ...
0
votes
0answers
44 views

Import search configuration in JSOM

Does somebody know if it's possible to import a search configuration XML file to a SharePoint 2013 site collection in JSOM? I am trying to do so, but didn't find anything relevant: everything I find ...
0
votes
0answers
67 views

How to fetch 'nth ' items from a SharePoint List one by one through Client Object Model in SharePoint Online

I want to fetch nth Item from a SharePoint List from a SharePoint Online (Office 365) site and then compare it with the other Items of the SharePoint List. I am doing the following code. Can anyone ...
1
vote
1answer
993 views

An unhandled exception of type 'System.Net.WebException' occurred in Microsoft.SharePoint.Client.dll

I try to access SharePoint list from a console app in .NET. My environment doesn't have SharePoint installed one and I write code in VS 2013. I want to access SharePoint 2013 list data. When I run my ...
0
votes
1answer
547 views

Access denied to upload aspx file to document library in SharePoint Online (O365) using CSOM

I am trying to create a "Link to a Document" programmatically, similar as explained here: Create a 'Link to a Document' in a SharePoint Shared Document List using PowerShell Document library is ...
0
votes
3answers
262 views

JSOM default groups when creating subsite

function createWebsite(siteName, site) { this.clientContext = typeof site !== 'undefined' ? new SP.ClientContext(site) : SP.ClientContext.get_current(); this.oWebsite = ...
1
vote
1answer
146 views

init.js Obect expected error with SP.SOD.executeOrDelayUntilScriptLoaded

I am using SP.SOD.executeOrDelayUntilScriptLoaded as follows SP.SOD.executeOrDelayUntilScriptLoaded(NBSFeedbackEditInbox.FeedbackRemove.removemessage(itemid), "sp.js"); Yet I am getting an error ...
1
vote
1answer
396 views

Request failed. Column 'Project Phase' does not exist. It may have been deleted by another user

function fetchProjectData(projectName, callbackOnSuccess) { var clientContext = new SP.ClientContext("path to site"); var oList = clientContext.get_web().get_lists().getByTitle('Project ...
1
vote
2answers
131 views

Reference problem when trying to replace a master page file while keeping the original in CSOM

I have some logic that does some custom file provisioning in CSOM. It basically tries to upload various files located on a provided-hosted (Azure) site to mapped locations in the Sharepoint host site ...
1
vote
0answers
20 views

SharePoint document library Multi User field set only odd position users in case of Office documents

I am trying to set users in Multi-User field of document library documents by using CSOM. It works properly for normal documents(non-office docs) but for office documents it is setting only odd ...
1
vote
3answers
84 views

Error from javascript file but not console?

The error in question Uncaught Error: The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested. ...
0
votes
1answer
54 views

Updating Person Field javascript error

I am creating a new list item using CSOM. When I try updating a Person field, I'm getting a error saying my function is undefined Uncaught ReferenceError: createListItem is not defined it ...
0
votes
2answers
130 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
1answer
186 views

Getting (403) Forbidden.Error for another ClientContext

using (ClientContext tenantContext = new ClientContext("https://site-admin.sharepoint.com/")) { SecureString password = new SecureString(); foreach (char c in ...
2
votes
2answers
288 views

Get url of ALL lists on a SharePoint 2013 site using JSOM

I'm trying to retrieve the url for all lists on the current SharePoint site. I've managed to get the title for each list, I've also found resources explaining how to get the url of one specific list. ...
1
vote
2answers
892 views

Attach file in CustomList Item using Sharepoint.Client object

Hi is there a way to attach file in specific Custom list item? Currently i tried to add files on the root folder using below code: using (ClientContext context = new ...
1
vote
1answer
16 views

SharePoint integration outside farm

Can someone provide me an overview of the possible ways of interaction with SharePoint from an external source. For example add items to a list from an application not running in the farm. In a farm ...
1
vote
1answer
28 views

Guess SharePoint version based on connection parameters

My client application uses the SharePoint Client Object Model against SharePoint 2010 and 2013. I would now like to add support for SharePoint Online. Users of my application specify the 'Url' to ...
0
votes
0answers
78 views

Upload aspx file to host web in App Installed remote event receiver (rest file upload)

I'm creating AppInstalled remote event receiver that should upload aspx file to host web library (library is also created in app installed receiver). If I set app permissions to Web:Manage I can't ...
1
vote
0answers
27 views

Determining Users on SharePoint website with API?

Was thinking about building an app part that enabled some level of in-app messaging to other users currently on the site (probably via use of websockets connections to each other). Is there any way ...
1
vote
1answer
94 views

How to get all events from multiple sites

I am currently getting all events from a calendar one calendar at a time. These are all sharepoint online calendars. This is working fine but a little slow. The basic of what I am doing is: ...
1
vote
1answer
146 views

How do I connect to a specific site collection using CSOM and SharePoint Online

I cannot find anywhere to specify what site to connect to when creating a new app for SharePoint online. It seems to default to https://mysite.sharepoint.com, however, I want to retrieve lists from ...
1
vote
1answer
401 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
0answers
195 views

Update Custom Field in Task Level Project Server using JSOM (PS.js)

Does anyone have javascript which updates the task level custom field? I just have the code with C#. I am trying to convert this code (below) to javascript and use it. DraftProject projCheckedOut = ...
0
votes
0answers
68 views

SharePoint-Hosted App check if folder exist in HostWeb

This is wierd, i have created a folder in site asset programmatically by JSOM. Then i created a function to see if my folder exist or not (In the GUI its visible). My function returns null but if i ...
0
votes
0answers
33 views

Edit list Email Alias via CSOM

I am trying to set a list's email alias via CSOM and can't seem to find a way to do it. I can do it in powershell via the .EmailAlias property and I can also set that same property if I were writing ...
1
vote
2answers
316 views

Get list default view url in SharePoint JSOM Client Object Model

I have simple JSOM script to get all the list and it's default view url but i am not getting default view url property var context; var lists; // This code runs when the DOM is ready and creates a ...
1
vote
1answer
88 views

How are Deferreds different from callbacks

I have following piece of SharePoint JavaScript client object code which works perfectly without throwing any error. $(document).ready(function () { //don't exectute any jsom until sp.js ...
0
votes
0answers
52 views

Using SP.UserProfiles.PersonalSiteInstantiationState

I am attempting to check a User's MySite status by utilizing sp.js to return the following enumerations. I have had success using the People Manager & Person Properties objects, but not the User ...
0
votes
0answers
330 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 ...
1
vote
2answers
71 views

How to retrieve a file by UniqueId in any List subfolder

I would like to get a file by UniqueId inside of a List. I am not guaranteed which folder the file will be in so I'm using the List.GetItems call and using a CAML query to only pick the file that ...
0
votes
0answers
61 views

2013 MySite - WebPart provides user properties

I'm currently branding a 2013 MySite host and to do so I access some user information via JSOM. EnsureUserProperties: function (callback) { /// <summary> /// Ensures that the ...
0
votes
0answers
132 views

N number of call for /_vti_bin/client.svc/ProcessQuery

I have on application page which will display data from list. For that I have write client object model code which is as follow: var PageList = _spPageContextInfo.siteAbsoluteUrl + '/xxxx'; ...
1
vote
1answer
266 views

Field names in announcement list in Sharepoint Online

I am trying to add fields to an announcement list. I have successfully added various fields with single-word names: announcementy.Fields.AddFieldAsXml("<Field Type='User' ...
0
votes
1answer
46 views

Index out of range, when context.ExecuteQuery(). While creating the Taxonomy

I am writing a provider hosted app. In this I am trying to create taxonomy group and then multiple term sets. The first set gets created successfully but the second time in the foreach loop, ...
1
vote
0answers
38 views

Cannot update allowMembersEditMembership

I can't seem to update the setting on a group to allow members to edit members. This is my code: function setGroupsMembershipEditingMode(uri) { var context = new SP.ClientContext(appweburl); var ...
1
vote
1answer
252 views

How to write a WCF Service for SharePoint 2013 hosted App?

I've deployed a WCF Service in SharePoint. I am able to retrieve data from it using URL: http://nit-hv8-itr4:1111/_vti_bin/PresidentsService.svc/GetAllPresidents The problem occurs when I try to ...
2
votes
1answer
122 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 ...
1
vote
2answers
252 views

How to itetrate through files in a document library

I've been creating a provider hosted app and I'm stuck at retrieving Documents titles using CSOM C# my code is as follows. var spContext = ...
1
vote
1answer
965 views

Reading SharePoint Document Library File names using CSOM

I am trying to read the file names from SharePoint document library. I have uploaded some files and created some folders on the site. I get the ItemCount number. But when i try to get the File count ...
1
vote
1answer
420 views

Assigning Folder Permissions with JSOM

Is it possible to use JSOM to assign unique folder permissions? I found the SP.BasePermissions.set() method but can't seem to find much documentation on it. Much more out there using C# but ...
3
votes
1answer
103 views

Background tasks/timer jobs in SharePoint O365 with Azure provider-hosted app

I am building a provider-hosted app for SharePoint (O365) which is hosted in Azure. I do all of my logic through CSOM, more specifically using an MVC web project. At the moment, I have some branding ...
1
vote
2answers
115 views

Javascript always failing

I am busy writing some javascript to take a list of selected documents and do some processing on a list with each document in Office365. I am getting a strange error when the code tries to load the ...
1
vote
1answer
88 views

Issue in REST call

I have two methods which will be call on bashed on condition Code: //Method to add item in TT items list. function addTTItemsList(url, listname, itemTitle, columnOrder, rowOrder, listName, ...
3
votes
1answer
203 views

Checking CSOM people editor value

How can we check the user entered key in Client people editor is user or group? I have created a people editor in CSOM. I can save the value to the list successfully. But before saving i need to ...
1
vote
1answer
533 views

O365: Unable to get property 'get current' of undefined or null reference

I'm on SP2013 in an O365 environment. I am trying to pull some data from a list and render that data using the Google charts API. I am doing this in a content editor web part that points to an HTML ...