The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
19 views

SP 2010 CSOM Javascript: Intermittent Failure

I have inherited some JS code that is playing up. It looks something like this: ExecuteOrDelayUntilScriptLoaded(MyFunc, "sp.js") function MyFunc() { var ctx = new ...
1
vote
1answer
26 views

Reading all properties of web using Javascript object model

We can read the web properties using javascript object model as var webProperties = web.get_allProperties() and then to fetch a property value we can index it using ...
0
votes
2answers
27 views

GetUserEffectivePermissions returning 0 (“EmptyMask”)

I'm trying to retrieve the current user's permissions for a list but I keep getting an emptyMask result, even when my current user account is a Site Collection Admin. function ...
0
votes
1answer
18 views

Change Group permission using JSOM in SP 2013

I'm trying to change the permissions of an SP Group in an SPWeb using JSOM. I can add a new role using a new RoleDefinitionBindingCollection oblect to the group. But a similar approach to remove a ...
0
votes
0answers
28 views

Injecting javascript into sharepoint online master pages via jsom

I am attempting to inject javascript into the master page for my sharepoint online portal via sharepoint hosted app, but I'm running into a problem where when using the PnP sample as a guide I'm only ...
0
votes
1answer
24 views

Uncaught TypeError: web.get_url is not a function

When trying to execute the following code i got the mentioned error. Here is the snippet: var clientContext = new SP.ClientContext.get_current(); var web = clientContext.get_web(); ...
0
votes
0answers
14 views

Can SharePoint objects like 'SP.ClientContext' be used while developing Office 365 Mail Addin in Napa?

I am developing a Office 365 Mail Addin in Napa. I am trying to use the object of SP.ClientContext but it shows me error that SP is not defined. Office.initialize = function (reason) { ...
0
votes
0answers
13 views

Editable SharePoint 2013 Grid control in app

I would like to display editable data in a SharePoint-like grid control in my Project Server App (javascript object model). The look and feel I want to achieve is something like this: (image from ...
0
votes
1answer
18 views

Enumerating contents of 'context.load' JS object works but using 'getById' does not work

In my Office 365 App I have a simple functionality where it loads a library and then reads a couple of fields for all items in the library. Below is my sample code: (function () { ...
0
votes
0answers
17 views

How do i get people picker value in list joins in sharepoint 2013 JSOM

I have two lists List 1 and List 2, I have to get people picker value from List 1. But because of some limitations we cannot get 'lookup' type columns in joins for that refer the below link ...
1
vote
2answers
48 views

SP2013 javascript client object model - get server time

My client machine and server machine has time offset of 2:30 hours. So when I try to retrieve Date/Time field using JSOM, it gives time according to offset. oListItem.get_item("Modified"); So how ...
1
vote
0answers
31 views

How do i query date range comparisions in sharepoint 2013 list using JSOM

I need to compare date ranges the result should be between start date and end date. I am using Sharepoint:DateTimeControl picker and get the date using jquery, then converted date like startDate ...
0
votes
0answers
22 views

Set value to ClientPeoplePicker

I need to set value into a ClientPeoplePicker, my list save the user as a SPUserField, I already get the id from the list. Thanks and greetings
0
votes
0answers
46 views

How to query lookup column in list join using caml query JSOM sharepoint 2013

<ProjectedFields> <Field Name="Column" Type="Lookup" List="Employee_Table" ShowField="Column" /> </ProjectedFields <FieldRef Name="Column"/> <Query> ...
0
votes
0answers
23 views

Get current color palette for the site

I'm wondering if it's possible to find somewhere what .spcolor file is used for the site theme. As there is a method for applying theme to the site: ...
1
vote
1answer
57 views

CAML query in JSOM for SharePoint 2013 results in “value does not fall in the expected range”

While querying yes/no column using caml query JSOM sharepoint 2013 getting "value doesnot fall in the excpeted range". <ProjectedFields> <Field Name="DateColumn" Type="Lookup" ...
0
votes
1answer
34 views

How to check if a Site collection exists using App model (JSOM,CSOM)

Is there a way to check if a site collection exists before creating the site collection? I am doing it using the App/Add-in model. Thanks.
1
vote
0answers
23 views

Client-Side Save Event in Edit Mode

Is there any client-side event I can listen to when a user saves a page? I know how to detect the edit mode and I could add event listeners to save/check-in buttons, but it would be better to listen ...
0
votes
1answer
51 views

Get clicked item ID from list

I have a list with items. Each item contains a link to another page. If a user clicks on one of those items, the specific item should get updated with a date when he clicked it. Now I get a target ...
0
votes
2answers
76 views

Cannot execute JSOM code correctly

I am iterating List A and fetching each items title. Then I match the title against a column in List B. If a match is found I add relevant columns in list B and output. I have put 2 items in list A as ...
1
vote
1answer
36 views

Get Field order from a list view : Javascript object model

I am getting the fields of a list view using the javascript object model view.get_viewFields() However, this does not return the fields in order which they are configured in the view. It just ...
0
votes
1answer
35 views

SharePointOnline\Office365 reading list data is taking long time to load

I wrote a custom JSOM script that uses SPServices to read list items from a list with 2430 items and 11 fields\columns. The scripts reads all list items and loads them in to JavaScript object. It is ...
0
votes
0answers
21 views

One time authenticating a user for both JSOM and CSOM calls

I have a SharePoint hosted app that requests the user's login credentials and sends them to a WCF service that at some point creates a context in CSOM using these credentials to issue some requests ...
0
votes
2answers
33 views

Enable major versioning javascript

How could I enable major versioning on list? My code is not working and I don't get any errors. _spBodyOnLoadFunctionNames.push(onPageLoad()); function onPageLoad() { ...
0
votes
0answers
82 views

Check permissions for user - AD group and javascript

We are building a single page application that resides in SharePoint and now we would like to show some components based on the current users permission on a list item. The problem is that ...
2
votes
1answer
33 views

Missing properties of _spPageContextInfo after page load

I have a script that provision site collections under a specific managed path. In these site collections, I have sub webs with page libraries in which I have several different pages with custom ...
1
vote
0answers
30 views

How to validate current user permissions for a given Term Store Group using CSOM

I can't seem to find a way to check for the current user permissions for a term store group or term set in Sharepoint Online. I know the REST interface does not support any kind of interaction with ...
0
votes
0answers
56 views

Find web part type using JavaScript Object Model in SPOnline

I need to go through all web parts of a page (e.g. default Display page of a list) and set the JSLink property on a particular web part. I can enumerate the web parts on a page and set the property on ...
0
votes
2answers
59 views

Need to pause While loop

I am using SharePoint 2013 in the cloud. Due to restrictions in the site, I am using JSOM and jQuery to customize a site. I have modified a Document Library edit form to create Tasks for each person ...
0
votes
1answer
64 views

How to get item id of copied file from SharePoint javascript api

I want to copy multiple files from one Document Library to another with metadata and column values associated from the copied file to the destination file. I am using SharePoint 2013 JavaScript Client ...
-1
votes
1answer
38 views

count rows in longest sharepoint list javascript

I want to get count rows in a List some have longest name while I am looping through all Lists. I want it in JavaScript
1
vote
2answers
40 views

Cant fetch SharePoint list column items with JavaScript

I cant run my code. I get this error message: 0x800a139e - Runtime Errors in JavaScript : The property or field has not been initialized . There has been no request or has not been performed. It ...
1
vote
1answer
54 views

Approve Permission to list item in SharePoint 2013

I have to set approve permission using JavaScript client object model. I have used below code to set other permission. But for Approve it is not working. function ...
2
votes
1answer
35 views

JSOM - Promise method on SharePoint 2010 site

I followed Vladim's suggestion in post and it works great on SP 2013 site but not on a SP 2010 mode site in the same farm. I have used the exact same code that works on the 2013 site but I get the ...
0
votes
1answer
53 views

Set default contenttype on list, from JSOM

I got some JavaScript that is creating some Lists and Content Types. I am able to set the Content Types on the Lists, however I am not sure how I am suppose to set it as the Default Content Type. So I ...
0
votes
1answer
53 views

How do I get all current users from a site

I need to get all currently active (not removed users) from a site. I have the following JS that gets all the users but some of them are old users that have been removed from the site (still exists in ...
2
votes
2answers
166 views

Open modal dialog from webpart in the parent page

I have written a SharePoint application which is embedded in a page as an AppPart. Now I want to open a modal dialog in the parent page. This code opens the dialog only in the current AppPart: ...
1
vote
0answers
26 views

structuring Javascript for sharepoint code

I have been reading many articles and going through many video tutorials, they explain almost all patterns from javascript (Module pattern, Prototype pattern, Revealing Module pattern and etc) with ...
4
votes
4answers
139 views
+50

JSOM for anonymous users

I am writing a public facing web site in sharepoint 2010 and using JSOM to access data from lists, Things are working and now trying to deploy on production server, server has strict security settings ...
0
votes
0answers
44 views

JSOM not working in SharePoint App - Uncaught TypeError: Cannot set property 'oListItem' of undefined

Started the development of my first SharePoint hosted app. Getting stuck with creating list item in a list Kundeninfos in the appweb. Error Uncaught TypeError: Cannot set property 'oListItem' of ...
0
votes
0answers
26 views

Fetch names of subsites in Office 365 developer site using NAPA tool

I was told to find fetch the title, description and list collection of my Office 365 developer site. I have completed till that. My working code is as follows : 'use strict'; var context = ...
0
votes
1answer
145 views

JSOM: Limit calls to SP.ClientContext executeQueryAsync with promises (Angular example)

I have asked myself this question several times before: Is it possible to have a JavaScript function used multiple times from multiple locations returning a promise calling ctx.executeQueryAsync, ...
0
votes
1answer
34 views

CAML query for the last document uploaded by a particular user

I'm trying to write a query using the JSOM to get the last document uploaded to a document library by the current user. The reason I'm doing this is because I have an upload button on a form and need ...
2
votes
1answer
76 views

System.UnauthorizedAccessException when accessing list with JSOM

I try to get items from a list with JSOM. But I get a System.UnauthorizedAccessException with error code 2147024891. If I navigate and authenticate to the site with a browser I am able to access the ...
1
vote
1answer
63 views

Make load variable private

I have the following function which retrieves the current user's properties: function helper_redirect(){ this.clientContext = new SP.ClientContext.get_current(); this.oWeb = ...
1
vote
0answers
56 views

Sharepoint Workaround for Mixed content (Insecure Script) Error

I am using a client side script in a SharePoint page. Since the script is hosted in other server and delivered through http, I am getting a mixed content error in javascript console. Mixed ...
2
votes
0answers
30 views

How do I get a list of followers for a content?

I need to know who is following a site a document or a tag. found how to get followers for the current user but not for a content.
1
vote
1answer
83 views

Get AD user object GUID using Client Object Model in Sharepoint

I want to extract the objectguid corresponding to a username from the AD using javascript in Sharepoint. Is it possible? I can get some properties like the current username by using ...
0
votes
0answers
77 views

Rest API create personal site enque

I'm trying to provision My Site by utilizing SharePoint JSOM or REST API. The JSOM code snippet (below) gives System.UnauthorizedAccessException and REST call gives me a 401. The goal here is to ...
1
vote
1answer
27 views

How to write data to a MySQL or SQL database?

I want to crypt a string and then store the result in a MySQL or SQL database with Sharepoint (so I can later take that value and use it inside a PHP application). Can I connect to a database and ...