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

learn more… | top users | synonyms

1
vote
1answer
21 views

How to create site custom field

How can i create custom fields for a site or sub site like Title and Description i've sub sites and every site has unique banner and some information i want the user will be able to add these ...
0
votes
1answer
103 views

How to get all lists and document libraries in subsite

What I want to achieve now is to retrieve all document libraries and lists in sub sites with links to those libraries via JavaScript. So I can add them to my Page Layout to be like Side Nav
0
votes
1answer
90 views

How to get parent site lists

I am using JavaScript on a subsite to retrieve items from a list which is on the parent site. When I use this code: var clientContext = SP.ClientContext.get_current(); var lists = ...
0
votes
1answer
30 views

Retrieve list items Links

When retrieving list items via Javascript, how to get the link or action to click and go to that item link?
1
vote
2answers
184 views

Create a Sharepoint wiki page using JSOM

I need to create a Sharepoint wiki page using JSOM, Can anyone guide me to create path? I'm very very new to Sharepoint and eager to learn. I found this but it uses Rest API and didn't find it very ...
-3
votes
3answers
82 views

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

function listAllCategories() { var ctx = new SP.ClientContext(appWebUrl); var appCtxSite = new SP.AppContextSite(ctx, hostWebUrl); var web = appCtxSite.get_web(); //Get the Web var list = ...
0
votes
2answers
33 views

Real Columns names

var clientContext = SP.ClientContext.get_current(); var lists = clientContext.get_web().get_lists(); var oList = clientContext.get_web().get_lists().getByTitle(listName); var collListItem; var ...
0
votes
3answers
280 views

Java script how count users in group by javascript

How could I count how many users are in Group? How could I count by JavaScript.
2
votes
3answers
247 views

ExcuteQueryAsync functions inconvenient

Can any body explain this ? clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); it always output an Error in ...
0
votes
2answers
247 views

SharePoint Online Iterating through Document Libraries CSOM

I am trying to iterate though a document library and set each document/items within to inherit permissions (at the moment each doc/item is using uniquer permissions). I am able to get the specific ...
1
vote
1answer
69 views

RoleDefinitions.BreakInheritance 2013 CSOM API

I need to break permission level inheritance. The following works fine with the server API: SPWeb.RoleDefinitions.BreakInheritance(true, true) Now I need to do the same with Sharepoint 2013 CSOM ...
3
votes
3answers
212 views

Why does .get_title() called from an (SPOnline) App-Web return an incorrect Localized DisplayName?

!! this is NOT about localisation of the App Web Its about getting an incorrect response from the HostWeb when using get_title() !! Can someone please explain me where I go wrong with the testcode ...
0
votes
2answers
43 views

Retrieve all files from all folders

I've a picture Library which contains to folders i've retrieved them by this code getListItems('myList'); function getListItems(listName) { var clientContext = SP.ClientContext.get_current(); var ...
0
votes
0answers
24 views

How to select parent list whole data with child list data. CHild list containing parent lookup field

I am trying to get data from chlid list which contains parent lookup filed.Also to get parent list data with child data by using join but got nothing can anyone provide me way how to do this
1
vote
1answer
129 views

How to use result obtained from clientContext.executeQueryAsync

i have to use result obtained from clientContext.executeQueryAsync for condition in code.But, now i face problem that clientContext.executeQueryAsync result not obtained when needed.
0
votes
1answer
113 views

'u.Email' threw an exception of type 'Microsoft.SharePoint.Client.PropertyOrFieldNotInitializedException'

'u.Email' threw an exception of type 'Microsoft.SharePoint.Client.PropertyOrFieldNotInitializedException' When I try to get the email from a user in a list. Here is mycode: CamlQuery query = ...
2
votes
2answers
177 views

Sharepoint 2013 Development Boundaries

I need some understanding around SharePoint 2013 Development model. What are SharePoint 2013 Development Boundaries? What SharePoint developer can and cant do with each model?
0
votes
1answer
197 views

how to search document from sharepoint 2013 document library using c#

i need C# code for to search documents from SharePoint 2013 document library. i was uploaded documents in SharePoint document library now i want to search all uploaded documents by using c# coding . ...
0
votes
1answer
77 views

The remote server returned 403 forbidden when creating subsite using remote provisioning pattern

I have the following scenario on sharepoint online. One Site collection with: RootWeb List Clients List Projects Subsite called Clients for hosting each client subsite One RER to create a client ...
0
votes
0answers
71 views

_spFriendlyUrlPageContextInfo undefined despite using managed metadata navigation

I'm building a custom navigation solution using the JSOM in Sharepoint 2013. I need to get the navigation term corresponding to the current page and I found this question with a similar problem and ...
0
votes
0answers
80 views

SharePoint Online Tenant Client issue when delete a site collection OR restore a site collection

Please follow below scenario using your browser: ( I tried in IE and Firefox) Go to http://-admin.SharePoint.com Login as administrator Try to delete a site collection Note: You can ...
0
votes
1answer
97 views

Get publishing page url using CAML

I am retrieving pages using CAML, and doing for loop on the results like the following: function _onSucceed(){ var html=""; for(var i = 0; i <results.length; i++){ ...
0
votes
1answer
188 views

Cannot read property 'get_current' of undefined

I am using this code: "use strict" var BasicJSOM = window.BasicJSOM || {}; BasicJSOM.Crud = BasicJSOM.Crud || {}; $(function() { BasicJSOM.Crud.MainDemo = new BasicJSOM.Crud.Main(); ...
1
vote
2answers
369 views

JSOM List Item Field Values

This should be an easy one but for some reason the answer is escaping me. I am executing a query with joins that includes projected fields (fields from one of the joined lists) using JSOM. Using ...
1
vote
0answers
81 views

CSOM object not initialized

I have code that gets group information from a SharePoint Online site using the CSOM API. I want to compare the id of a group with the ids of the associated groups of the web. When the code runs in ...
2
votes
2answers
189 views

SP Field.Hidden property not hiding?

I have set the property .Hidden of one field to $true. $field=$List.Fields.GetByTitle("Business Phone") $ctx.ExecuteQuery() $field.Hidden=$true The change has been applied successfully and if I ...
0
votes
1answer
80 views

How to download a folder from sharepoint given URL using CSOM

I am new to SharePoint development, so forgive me if I am asking stupid questions. I have spent quite some time searching the web without success, so I am hoping to find an answer here. Within a .NET ...
0
votes
1answer
188 views

Cross SiteCollection call with JSOM not working

I got a problem and my brain says "yes you made no mistake" but it doesn't work. Here is my problem: I have a SharePoint hosted App which has "Tenant read" permissions in the App Manifest. That ...
1
vote
1answer
474 views

Getting SharePoint feature properties programatically using CSOM in SharePoint Online

I am working on "Getting properties of SharePoint Feature using CSOM in SharePoint Online". Following is the code which I wrote : try { Password password = new Password(); ...
0
votes
2answers
356 views

Is it possible to refer to a field hidden in current view from JSLink attached to current view?

I have the following JavaScript code attached to List's JSLink property: (function () { var coloringFieldContext = {}; coloringFieldContext.Templates = {}; ...
0
votes
0answers
146 views

List all workflows with WorkflowServices throws exception. GetWorkflowDeploymentService returns null

I try to list all site workflows. I followed several examples and try to get the workflows by using CSOM and JSOM. This always fails with the error message: Cannot invoke method or retrieve ...
1
vote
0answers
49 views

Migrating SP2010 List Items to Office 365 creates empty items in O365 [CSOM]

I am trying to migrate SharePoint 2010 list items to an O365 list. But when the code is executed, it creates empty list items in O365 list even though "newItem" has the correct key value pair. Here ...
0
votes
0answers
148 views

List does not exist when trying to startworkflowonlistitem from CSOM

Using SharePoint 2013 on Windows Server 2012 Standard. I believe this is an issue with permissions. When trying to start a workflow on a staging server, the following exception happens (as shown in ...
1
vote
1answer
103 views

Cross-Domain Calls in SharePoint - Comparism

Basic Example mysite.mysharepoint.com has clientside code that wants to access a list on mysharepoint.com due to whatever reason. the Same-origin policy forbids this Possible Workarounds SSOM ...
2
votes
2answers
75 views

Is there any way to retrieve a Web by title using SharePoint 2013 JSOM without using the enumerator?

I need to get a subweb with a particular title using JSOM. So far, the only way I can see to do this would be to use code similar to the following: function getStuff() { var oWebsite = ...
0
votes
0answers
131 views

SharePoint 2013 Provider Hosted App is not working after Published to IIS throwing object reference error in Getting clientcontext

I've Created a SharePoint 2013 High Trusted Provider hosted app . Its working fine while debugging from Visual Studio , But once Published to the remote iis and trying to add the app from the App ...
1
vote
2answers
195 views

Reasonable way to get custom webpart properties via jsom?

I need to fetch some of the custom properties of my webpart from the front-end. Currently, I'm using var oFile = context.get_web().getFileByServerRelativeUrl(_spPageContextInfo.serverRequestPath); ...
0
votes
0answers
50 views

Creating Variation Labels using csom not creating Variation Hierarchy

I have created variation labels using csom code. Labels are getting created, but after that variation hierarchy is not created. Even if I run the Variation Hierarchy Timer job manually, it's not ...
1
vote
1answer
109 views

Error in migrating SharePoint 2010 list fields to Office 365 list [CSOM]

I am trying to migrate a SharePoint 2010 list to Office 365. I created a new ListCreationInfo for a new list in O365. But when i am to trying add fields from SP2010 list, its giving me an error after ...
0
votes
1answer
96 views

Writing sharepoint CSOM applications best practices

What is the best way to write sample snippets of code Visual studio 2012- Create a SharePoint App project. Issue :-Every time you need to query the list on the host web you need to query the ...
0
votes
1answer
108 views

Get ListItemID using ExecuteQueryAsync function

In the code below I can get the value of the ListItemID of a List. var siteUrl = 'https://company.sharepoint.com/sites/demo'; var t; retrieveListItemsInclude(); alert("after"+t); function ...
0
votes
0answers
37 views

showing data in custom asp.net from sharepoint 2013(document libs/lists)

What would be best approach to show docs or list in an asp.net page from SharePoint 2013 on premises? I would like to show documents and lists. Which one is better CSOM,Odata? With document libraries ...
0
votes
1answer
75 views

Using the SharePoint 2010 CSOM to Delete a list

I am trying to delete a list that contains documents using the SharePoint 2010 CSOM and am using the following code: //find the 'Project Documents' library and delete it var list = ...
2
votes
0answers
286 views

GetUserEffectivePermissions returns wrong results

I'm checking the permissions for user on a SharePoint 2013 list: using (var ctx = new ClientContext("http://comtoso.com")) { var list = ctx.Web.Lists.GetByTitle("TestList"); ...
0
votes
0answers
30 views

Property missing from cswp results

We are trying to do a custom control/item template layout to render results for cross-site publishing. We have made a proof of concept on a development test site that is working. When we try to ...
-1
votes
1answer
243 views

Calls to WebProxy without an app context are not allowed

From SharePoint 2013's default.aspx page (https://somecompany-public.sharepoint.com/pages/default.aspx) I'm trying to call a RESTful json API which lives outside the SharePoint domain, but getting ...
0
votes
1answer
1k views

How to include custom fields in clientContext.load()?

Loading some list items via var lists = web.get_lists(); var list = lists.getByTitle(listTitle); var listItems = []; for (var i in len) { listItems[i] = list.getItemById(itemIds[i]); ...
0
votes
1answer
110 views

Does JSOM offer an equivalent to SPQuery.CalendarDate?

I'm trying to get recurring items for a specific month from a list. Using the following, I can get the events for the current month: <Query> <Where> ...
0
votes
1answer
89 views

User or group column is populated with incorrect values when adding data from CSOM

I am working on a console application that updates list items using managed CSOM. I have a user or group column in this list that can contain multiple values. Now, I am using below code to update the ...
0
votes
1answer
673 views

Powershell deleting/showing list items csom

I am trying to delete items in a list using CSOM powershell but it doesn't seem to work at all, Here is my code atm which is trying to print out the title of my list items but this isn't working ...