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

learn more… | top users | synonyms

0
votes
1answer
37 views

Get Latest Created List Item

I got array of objects that is list items arr = [{id:"1",name:"item1",created:"Wed Feb 04 2015 03:36:42 GMT+0400"},{id:"2",name:"item2",created:"Sat Feb 04 2015 02:44:39 GMT+0400"}] i want to get ...
0
votes
0answers
46 views

Setting Url Variable for Sub site

I'm trying to create news list system. I wanted to set Url Variable via Javascript and get the item back by id to display details. Everything went good but when I try to href ...
0
votes
0answers
91 views

Get Item from content type using Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context) and display data in app part

How can I get a list item using Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context) instead of a list query. I want to use the content type and not depend on the list to get the items.
0
votes
5answers
170 views

Retrieve data from taxonomyfield using jsom gives error

I have a managed metadata type column in my document library. I need to get the data from this column by using jsom. But whenever I try to get the values it gives me error. The code and error are ...
0
votes
1answer
161 views

SharePoint 2010 Javascript JSOM creating a List View Web Part using javascript

I was able to follow along and add a Content Editor web part to a page using javascript from MSDN here. I am now interested in trying to find a way to add a List View or Data View web part to a page ...
0
votes
1answer
54 views

JSOM code not executing correctly when run without debugging

I have a custom js that creates dynamic layout. There is a function which renders this layout consisting of multiple divs. When I debug the JS, the layout is rendered correctly but when I run it ...
1
vote
2answers
332 views

How to assign masterpage via CSOM?

I have the following code to assign masterpage via CSOM but its not working, after I go to the site, it says File not Found, I guess URL is wrongly constructed. Please note that I am not trying to ...
0
votes
1answer
45 views

External websites calling Sharepoint data

I'm trying to figure out if what I'm looking to do is possible. We have existing websites that are not Sharepoint based. Internally, we have an anonymous enabled Sharepoint site we'd like to publish ...
0
votes
2answers
127 views

Csom or rest to verify user

I am uploading a spreadsheet to a task list using visual studio - the sheet will usually have users that are misspelled or incomplete and SharePoint throws a not a user error. I have to go back fix ...
2
votes
1answer
136 views

PropertyOrFieldNotInitializedException even if the field is loaded

I am using the below part of code in provider hosted app: Microsoft.SharePoint.Client.File destinationFile = destinationFolder.Files.Add(fileCreationInfo); ListItem ...
0
votes
1answer
214 views

SharePoint 2013 CSOM Upload a document from asp.net website

I am trying to upload a document from an ASP.NEt website (not an App) to a SharePoint library and using CSOM. This is an on premise sharepoint 2013, not office 365. Below is the code to upload the ...
2
votes
0answers
104 views

Get object of ribbon button in JavaScript

I am trying to access the ribbon button via JavaScript. Below is my code: // Get the page manager var ribbonPageMgr = SP.Ribbon.PageManager.get_instance(); // Get the ribbon var ribbon = ...
0
votes
2answers
523 views

How to create a search using sharepoint JSOM

I'm new to SharePoint and JSOM and i'm trying to build up a search using JSOM. and i tried below code snippets I FOLLOWED FOLLOWING BLOG ...
4
votes
1answer
479 views

Most efficient way to get all sub sites under a site collection/sub site using JSOM?

For the question lets assume the following site hierarchy Root Site Sub Site 01 Sub Site 0101 Sub Site 0102 Sub Site 010201 Sub Site 02 Sub Site 03 Sub Site 0301 Now if I want to get all ...
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
123 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
115 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
31 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
211 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
93 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
307 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
267 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
276 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
77 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
237 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
45 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
25 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
137 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
128 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
178 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
213 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
88 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
80 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
92 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
106 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
228 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
446 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
89 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
209 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
87 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
211 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
579 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
467 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
161 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
55 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
157 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
114 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
86 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
141 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 ...