0
votes
0answers
2 views

SP.RequestExecutor on SharePoint online

I deployed an App SharePoint hosted. I am using SP.RequestExecutor and it is working fine on SharePoint premise. but on SharePoint online it is not working. I added the library using this: ...
0
votes
2answers
4 views

SharePoint 2013 get user groups by CSOM

I wrote some code to get the current user groups by CSOM. function getCurrentUser() { this.clientContext = new SP.ClientContext.get_current(); this.oWeb = clientContext.get_web(); ...
0
votes
1answer
43 views

Get ContentType name with select fields

I have a problem with getting the ContentType name for a item. when i use http://sp2013dev/sites/mms/_api/web/lists/GetByTitle('List')/items(1)/?$expand=ContentType I get as response all Fields ...
1
vote
1answer
25 views

Reindex search results (Content Search Web Part, 2013)

I will just leave this here, since it helped us a lot: We have a Content Search Web part with custom Display Templates with link to edit item. After user edit item, we want to refresh the search ...
0
votes
1answer
54 views

Get list items created by logged in user with REST api

How can I get all list items created or changed by the currently logged in user with this function? What's the correct query? // Getting list items based on ODATA Query function getListItems(url, ...
2
votes
1answer
142 views

How to add URL to list using JavaScript

I have a list with a title and a url. I'm trying to add a new url using this function function addListItem(url, listname, metadata, success, failure) { // Prepping our update var item = ...
1
vote
1answer
80 views

Custom Ribbon Action - Disabled with Selecting Document Set

The custom action enables/disables when a list item or folder is selected/deselected. The issue I'm running into is when a document set is selected, the custom action remains disabled. The logic: ...
0
votes
0answers
16 views

How to interact with a SharePoint 2013 page in edit mode

I'm new to the SharePoint 2013 Javascript API, so I'm still bumbling in the dark, trying to figure out how to write some javascript code to interact with a Sharepoint 2013 page in Edit Mode. ...
0
votes
1answer
40 views

Javascript on masterpage returns undefined

_spBodyOnLoadFunctionNames.push("FetchURL"); function FetchURL() { // Custom JavaScript methods var ctx = new SP.ClientContext(); ...
1
vote
1answer
43 views

Sharepoint 2013 delete AttachmentFiles by JS

how can I delete an AttachmentFiles of a list item by Javascript? (with REST or using SP.RequestExecutor) Thank,Nk
0
votes
1answer
51 views

How to Get User Active Directory Groups in Sharepoint Online

I can't find any documentation or a way to find if a user belongs to an AD group with Javascript neither with the REST API or with the client model JSOM. I have a page in a Sharepoint site and I want ...
0
votes
1answer
26 views

Add icon hyperlinks to grouped SP2013 list view

In SharePoint 2013, I want to take the grouped view of a list and add 3 buttons to the left of each item. In previous versions of SharePoint, I would have duplicated the list view using a DVWP but ...
0
votes
1answer
26 views

Wait for completion of SP.RequestExecutor [duplicate]

I am using SP.RequestExecutor to add attachments to a list item. I followed Can't upload a non-text file to SharePoint App via REST API I need to wait the completation of the asynch call of ...
2
votes
1answer
118 views

SharePoint 2013: Check Workflow status programmatically (javascript)?

I need to be able to get the status of a SharePoint workflow 2013 using javascript. My goal is to start in a loop for all selected items synchronously a workflow. For that I will check if the started ...
1
vote
1answer
83 views

Get Navigation Term for Current Page in CSOM (JavaScript)

I am trying to get the Local Properties for the Navigation Term that is currently being viewed. For example... If I navigate to http://sp2013/about/team I need to get the Local Custom Properties for ...
0
votes
4answers
97 views

Retrieve List Items Using JavaScript gives unexpected response from server

I'm extremely new to SharePoint and was recently experimenting with the client side object model. I've used one of MSDNS examples. however, I seem to be getting this error response : "request ...
0
votes
1answer
23 views

How to find Web Parts on the current page using SP.js

I am trying to find out the title of the current page with SP.js without having to get it from the DOM. Is there a way to find what Web Parts are on the current page?
0
votes
1answer
41 views

How to change the SharePoint 2013 logo image dynamically?

Is there any way to change the SharePoint 2013 logo dynamically, ideally via javascript? I have tried: document.getElementById("onetidHeadbnnr0").src="\path\image.png"; Also tried: div = ...
1
vote
1answer
49 views

How can I add a Site Actions menu in a SharePoint 2013 full size app

Question: How can I just add a Site Actions Menu to the default chrome control rendered with the full sitze app? Problem: in a SharePoint hosted full size app there is no Site Actions menu. If ...
0
votes
1answer
39 views

Show persistent status bar + form to update easily

I want to keep informed the end-users of my SharePoint site of any issue or relevant informations. Naturally, I would like to do so by filling HTML elements (input and select tags). Hence displaying a ...
0
votes
2answers
68 views

JS/JQuery Connect to SQL Server

Right now i am modeling a ClientWebPart outside of the SharePoint server. Although, i advised the client to let me on the server to do Code Behind connection, they said not right now. Server might ...
0
votes
1answer
97 views

“The XSS Auditor refused to execute a script in…” from Chrome when using <script> tag in content editor webpart

Embedding javascript in a content editor web part triggers XSS Auditor error in Chrome when editing any webpart on the page containing the content editor web part. Steps to reproduce 1 - Use newest ...
0
votes
1answer
50 views

Export my Enterprise Wiki aspx pages to a PDF files

Our client has asked if we can add a link to their current Wiki pages named "Export to PDF", so when the user click on the link the Wiki content will be exported inside a pdf file ? i got confused if ...
2
votes
1answer
113 views

SharePoint 2013 sp.js Getting the column names of custom list

*Edit* I have figured out how come the data returned for the columns was showing the wrong labels. The issue occurs when the list columns are created using the quick edit mode, as it allows you to ...
1
vote
0answers
56 views

Starting a Sharepoint 2013 Workflow via js file

I´m trying to start a workflow 2013 from a custom ribbon icon. I have configured an elements.xml file where I call the Javascript file. The problem is, that I get a JavaScript runtime error “Type” ...
2
votes
1answer
88 views

how to customize OOB web parts UI

SharePoint 2013 brings a new concept of UI customization, via the JSLink, allowing to reconfigure the Web Parts UI aspect/behaviors, as exemplified by O'Brien here. Although, most of SPObjects ...
0
votes
0answers
32 views

Hide user presence contact card popup in SharePoint 2013

On hovering with the mouse over a user presence I don't want to display the contact card. We have used this to show user presence in a custom Webpart.
1
vote
1answer
58 views

how to find out when a user last visited?

I'm trying to figure out when a user has last visited.So let's say I logged out of my SharePoint intranet last night at 11PM, and this morning I logged back in at 9AM, I'd like to see a message saying ...
1
vote
1answer
76 views

JavaScript code to enable - disable people editor control not working in Chrome and Firefox

I have an application page in which two radio buttons and a people editor control is there. My requirement is, if radio button "Yes" is checked then the people editor control should be enabled other ...
1
vote
1answer
62 views

Create control to upload Attachment to list in SharePointOnline

I have a custom webpart page which is used to enter some input data which eventually gets saved as a List item. Now i want to add a control to that page which enables user to upload attachments to the ...
2
votes
1answer
109 views

How to convert date based on current users, using client side code

I have a date that I want to display to the user, and the format should be dynamic and based on the user. If I do this I get a format that doesn't fit every user. var prettyDate = ...
0
votes
2answers
144 views

Uncaught TypeError: Cannot read property 'get_current' of undefined

this one is weird I hope somebody can help me. I created a custom action for a callout on a document library. I added the javascript code in a code snippet webpart on top of the document library ...
1
vote
1answer
46 views

Can't add item to list in SharePoint Online app

This is an extension of my previous question... it was resolved but a new issue has come up after getting past that. Here's the code I'm currently using: var clientContext = new ...
3
votes
1answer
44 views

Error calling REST API in Firefox

I am using Rest API for Follow Functionality. My JS is working fine on IE but it doesn't work on Firefox(neither it goes under success call function neither under error. Is anyone having any idea ...
1
vote
3answers
91 views

Adding an item to a list using javascript — oListItem is undefined.

I'm using the code from this MSDN guide: http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx Here's what it looks like: var clientContext = new ...
1
vote
2answers
53 views

Execute JavaScript through a workflow?

I have a workflow that runs whenever a new item is created in a list, and I want the workflow to execute a piece of JavaScript code. So far I haven't found a way to call a function through a workflow, ...
2
votes
1answer
29 views

Projectserver loading resources

The problem is that I can't get my resources out of the ProjectContext. I can get the project names but then something goes wrong and i get this warning: Error: The collection has not been ...
1
vote
1answer
48 views

Search Api, filter by parameter

I'm using the Search Api to get the last modified documents by the person using the search. My search string is looking like that: https://www.intranet.i/site/_api/search/query?querytext='* ...
1
vote
1answer
38 views

Can't sync SIP Address, can't query it in search even when added manually

Issue 1 I'm trying to pull back a user's SIP address using the search service. I have this manually entered for the time being in a particular profile. My query: $.ajax({ url: ...
1
vote
0answers
47 views

Error from script tag for sp.runtime.js

I'm working to set-up the PreSaveItem() on an edit form for a list such that it evaluates parameters from the query string, and some list fields to execute workflows based on various criteria. Based ...
3
votes
3answers
194 views

how to determine if a page is checked out? Client side, using javascript?

I need a way to determine if a publishing page is checked out by the current user; I need this because I'd like to put a redirect, if the page is not checked out. Any ideas?
4
votes
3answers
200 views

SharePoint REST API call with more than 500 rows

I have an AJAX call querying the SharePoint REST API which will return more than 500 rows: $.ajax( { url: _spPageContextInfo.webAbsoluteUrl + ...
0
votes
0answers
16 views

SharePoint 2013 - disposing SP.ClientContext in JavaScript [duplicate]

I'm little bit confused about JS's COM in SharePoint 2013 and disposing ClientContext object. As far as I can see from earlier versions of SP (2010 mainly) you had to dispose ClientContext and ...
0
votes
1answer
55 views

Querying SharePoint search for all departments with REST API

I currently have an ajax request set up in my javascript to call the search API but this only gives me departments matching whatever I input for query: $.ajax( { url: ...
1
vote
1answer
32 views

Page with discussion board does not refresh after creating a new discussion within a modal dialog

I'm using the following code to allow users to create a new discussion topic in a modal dialog, rather than on a new page: // When called, this function opens the dialog. function openDialog(pUrl) { ...
0
votes
1answer
38 views

Run script on quicklinks on every page

On our sharepoint there is a serverside issue that morphes links into invalid values. I am able to correct that error clientside using javascript and ive been able to do so on the main page ...
0
votes
0answers
29 views

Error when calling isFollow() method. Error is “Invalid Pointer”

I am getting issue while fetching follow information for a site. I am getting error when calling isFollow() method. Error is "Invalid Pointer". below is my code function isAlreadyFollowed() { ...
0
votes
1answer
283 views

SharePoint 2013. JSLink (CSR) for field Type=“User” on EditForm

How to create custorm render for field type="User" on EditForm? I need to replace standart peoplePicker control with my custom render. Code below work without exeptions, but don't set 'Sponsor' ...
2
votes
1answer
37 views

Where/How Do I Add Backbone.js to Home.aspx Without Visual Studio

Is there a way to add an external javascript file to Home.aspx? I tried to add it to the Content PlaceHolder - PlaceHolderAdditionalPageHead but it didn't work (meaning that the link did not appear in ...
2
votes
1answer
338 views

Launch SharePoint 2013 Workflow w/Javascript

Looking to launch a list workflow from script tied to a button on a form. I've been referencing this article, as well as the code from example 5, and even tried using SPServices, but have yet to come ...