JavaScript Object Model

learn more… | top users | synonyms

0
votes
2answers
32 views

Modify list view with JSOM

How can I make fields invisible on my list view, all items? It is something wrong with my code now: it changes the view but the only field it is displaying is Title and Modified. I want to display ...
2
votes
1answer
28 views

How create Sharepoint online site with custom template?

I need to create site in sharepoint online from sharepoint hosted app. I used for it code like this: var webCreationInfo = new SP.WebCreationInformation(); ...
0
votes
1answer
39 views

Pure clientside webpart for Office365

I want to build a pure clientside (angular) webpart for my own environment. I want to have as small of a footprint as possible (So please no app domain or sandboxed solution). It's necessairy this ...
0
votes
1answer
45 views

Hide Title Field

Im creating a sharepoint list with Javascript, now i want to hide the title field in the same process. How can i acchieve this?, i was trying to add a jslink , and in that document, hide the title ...
0
votes
1answer
17 views

Dynamically enable feature in NCSS via JSOM

My original goal was to dynamically enable the SiteFeed feature in a dynamically created publishing sub web. This has been accomplished and works like a charm. Information on how to do this was ...
3
votes
0answers
24 views

Replicate AllItems.aspx inline edit in custom page layout

I am attempting to replicate the inline editing features found in the allitems.aspx page in a custom page layout. For whatever reason the "new" and "edit" list options don't seem to be showing up. ...
0
votes
2answers
38 views

How do I enable Intellisense sp.js in VS 2012. TILT

No matter what I try, I keep on getting the yellow triangles with the message "Intellisense was unable to colmplete an accurate...". For example when I type "SP." then among others ClientConetext does ...
1
vote
0answers
32 views

Sharepoint JSOM: set_item() without update()

I'm using SharePoint Javascript Object Model (JSOM). Can someone explain to me what set_item() does and what update() does? Below is some code to illustrate. Boilerplate code to get the list items: ...
1
vote
1answer
48 views

Set Managed Metadata Value on SP2010 Item using JSOM

Okay I am fairly sure that I've searched through everything, but I can't seem to figure out how to set a managed metadata value for an item using JSOM in 2010... Why can't we just upgrade to 2013... ...
1
vote
1answer
23 views

Get SharePoint group's MembershipGroupId in JSOM

I am trying to get MembershipId of SharePointGroup using GroupName. I can reach to the group using below but unable to get the member function or property which will give me Id for that group. ...
0
votes
1answer
12 views

REST addViewField “Cannot handle the data at position 0.”

I'm currently writing an initialisation script for a SharePoint-hosted application which checks if a list (used for launcher items) exists. If it doesn't, then it runs through a series of processes to ...
2
votes
1answer
33 views

Query Pages using REST

I've developed a newsfeed app part that currently gets its information from a list, however we're keen to have article pages that we can click through too. So far I've not found anything in the REST ...
2
votes
1answer
53 views

Create a document set with JSOM

I'm trying to generate document sets on the fly with the following code. It is using /_layouts/15/SP.DocumentManagement.js for the SP.DocumentSet.DocumentSet.create method which takes four parameters. ...
0
votes
1answer
13 views

Can I sort Rest by multple fields?

How can I get order Reset results with 2 colums? /_vti_bin/listdata.svc/News?$filter=Expires+ge+datetime'2012-11-23'&$orderby=Created also I want to order by the filed Topnews
0
votes
0answers
32 views

Configure Personal site through REST

I am having difficulty accessing the users personal site details through REST on O365. I would like to run the code from the intranet home page (companyname.sharepoint.com) and of course I cant use ...
0
votes
2answers
69 views

How do I move files from one document library to another using JSOM?

I have two document libraries on the same web, and am wanting to move the files from one to the other using JSOM/CSOM. Can anyone please shed some light on how to do this? Thanks
2
votes
0answers
22 views

SPListItem.BackwardLinks equivalent in CSOM, JSOM, or REST?

In the Server API for SPListItem there is a property called BackwardLinks that returns a collection of items that link to the item. I don't see the same property in CSOM, JSOM, or REST. Is there a ...
3
votes
1answer
102 views

How do you properly write to a managed metadata column from JSOM? (SharePoint 2013)

I am trying to write the value of a managed metadata column across several documents in a document library at once using JSOM, but for some reason the way I'm trying only writes the value to the first ...
1
vote
0answers
14 views

Remove App Part chrome from JSOM (SP2013)

I've built a sharepoint hosted app that contains a single App Part. This part can be inserted in any page by adding a new App Part through the ribbon. This all works fine. Now: The App part ...
1
vote
0answers
32 views

Invoke Asset Picker from JSOM

I have a custom page layout hosting Javascript. In it, I have a text field and a browse button that when clicked should open the SharePoint Asset Picker and subsequently populate the text field with ...
1
vote
2answers
64 views

How to fetch Newsfeed using JSOM

Is there a way to fetch Newsfeed with Link to Hashtag and all rich content using JSOM? We are able to fetch Newsfeed but all text is coming in plain text whithout any link to Hashtags. Is there a ...
3
votes
2answers
111 views

What are the advantages of using SP Services?

What advantages would I gain by using the SP Services library in SharePoint releases 2010 and later? The 2013 (and even the 2010) JavaScript Object Model and REST API seem to cover a significant ...
0
votes
1answer
32 views

Check In file with Javascript and REST

I am trying to check in a file from my sharepoint-hosted app with jsom and rest, but it wont work my code look like this: function checkInFile() { var hostUrl = ...
0
votes
0answers
94 views

Kick off Sharepoint 2013 workflow using JSOM in app

I'm trying to make a SharePoint 2013 app which kicks off a workflow. Already googled and tried samples, but keep getting this error : 0x800a139e - JavaScript runtime error: The property or field ...
0
votes
0answers
17 views

Stuck on designing library with folders for each User

I have a requirement to create an HR document management structure, but I'm a little stuck on how best to design it. Environment: SP2013 Standard... they don't want anything that would make an ...
0
votes
0answers
54 views

Get List by “InternalName”

I'm trying to use the SharePoint 2013 JavaScript Object Model to retrieve a List via an internal name equivalent. SPList doesn't have a Name or Internal Name property. It is referred to by the ...
0
votes
0answers
15 views

custom page allowing verification of existing item

The scenario is that I need a multi stage pages. Ideally I would like to do this on a single page but for simplicity 2 pages are fine. On the 1st page I need to verify if an item exists in the ...
0
votes
3answers
78 views

Enabling Content Types in Document Library using JSOM

I created some JavaScript Code whose purpose it is to create a Document Library, enable Content Types in it and add another content type. I added it to my SharePoint 2013 environment using the script ...
1
vote
1answer
88 views

How to create a Document Library with Metadata Column using JSOM

I am trying to automate the creation of a document library. Therefore I have a button which after clicking on it creates a new document library with at least one managed metadata column. I already ...
0
votes
1answer
65 views

Identify if a Library item is a folder or not in CSOM

I have Library on which I have created a ribbon button. On click of the button I am trying to identify if the selected item is a folder or a file. below if the code snippet that I am using: var ...
2
votes
2answers
125 views

How to retrieve all items from a list by javascript object model and store it to array

I'm new to JavaScript Object Model in SharePoint 2010 and want to get some idea of that. I wrote below code to get all list items of a SharePoint library. This works fine and return all items. But I ...
2
votes
1answer
417 views

Using JSOM or REST get list items stored in a different web application

In an on-premises SharePoint 2013 environment I need to read list items stored in a different web application using JavaScript based solution. This could either be JavaScript in Script Editor web part ...
0
votes
1answer
88 views

Error starting a workflow on host web from within a SharePoint-hosted app

I am trying to start a workflow on the host web from within a web part in an app. Here is my code: var clientContext = new SP.ClientContext.get_current(); var hostWebUrl = hostUrl; var ...
0
votes
1answer
128 views

ReferenceError: SPClientTemplates is not defined

I am trying to use the client-side People Picker and I can't get it to initialize the people picker due to SPClientTemplates not being defined. I am following MS documentation line by line but cannot ...
0
votes
1answer
68 views

What governs the decision to use server object model or client object model or javascript object model or REST?

What governs the decision to use (in SharePoint 2013)?: server object model (ssom) client object model (csom) JavaScript object model (jsom) REST
0
votes
0answers
11 views

Querying 'Append Changed to Existing Text' from client script?

Is there a way, preferably via REST but JSOM would work, to query a SharePoint 2010 field to get all entries when 'Append Changes to Existing Text' on a multiple lines of text field is enabled?
1
vote
1answer
163 views

Read DOCX files using javascript in sharepoint 2013

Can we fetch contents of DOCX files uploaded in a doc library from javascript code ? I could easily read a TXT file ref : http://msdn.microsoft.com/en-us/library/office/jj163201(v=office.15).aspx . ...
0
votes
2answers
184 views

Invoking SP.ModalDialog in Sharepoint 2013 Hosted Apps

I'm building a SharePoint 2013, SharePoint Hosted app project using the JSOM api. I have to make use of the SP.UI.ModalDialog to popup some content in the app. I have used the getScript method to ...
1
vote
3answers
258 views

SharePoint 2013 getting all webs in a given site collection including root web using JSOM

Using JSOM I am trying to get the collection of all the webs(sub-sites) including the root web of a given site collection and display there title. Below is the code snippet. But it throws error ...
0
votes
1answer
157 views

get properties from an List Item

I'm following a code sample from msdn to get properties of items from a list. My announcements list has 2 items. But for some reason I get an exception while getting the enumerator (TypeError: ...
2
votes
2answers
147 views

SharePoint 2013 reading data from multiple document libraries from multiple subsites in one site collection

I have multiple subsites in single site collection. All of these subsites have document library with same name. So is it possible using JSOM to read data from multiple document libraries with same ...
2
votes
2answers
197 views

Updating list items by JSOM

I am currently trying to migrate a list from one sharepoint to another. I did this a few months ago allready and there it worked not bad. But now I run into problems. The list is a discussion list. I ...
0
votes
2answers
96 views

SharePoint Hosted App Code behaves different

This code is working if i dont use it in a app. But in a app its not working. The app is sharepoint hosted, and the list is on the same domain as the app. context = new ...
0
votes
1answer
50 views

Using results of executeQueryAsync with JSGRID

I understand I can retrieve the list data using context.load(data) and later firing context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, ...
0
votes
2answers
70 views

Insert record with Date into list via JSOM, problem with UK Format

I have found that when inserting a record which contains a Date using JSOM the update(); will not work if you specify the format of the date to be UK date (28/05/2014). The code does not error, it ...
1
vote
1answer
70 views

Upload file using JS and REST. Specify content type

I can upload file to SharePoint library using JS and REST. The content type of added file is as library default content type. How can i specify file content type when uploading file? Thanks!
0
votes
2answers
225 views

SharePoint hosted APP - Create subsite with JSOM under hostweb - Access is denied

I'm trying to create a SharePoint hosted app that creates a subsite under the hostweb with JSOM. The app has full control on the site collection. Why do i I getting this error message: My code: ...
0
votes
2answers
52 views

Get the ID of a new listItem and update same record

I'm trying to add a new record and get the new ID created then use the new ID to create a specific reference number using the following code. function saveDraftGHrecord() { ghList = ...
1
vote
2answers
573 views

Get/retreive managed metadata column value from Document Library using SharePoint 2013 JSOM

I am trying to retrieve managed metadata column (NewsCategory) value in SharePoint 2013 Document library using JSOM. I get "Object Object" rather than actual value. I tried:- var newsCat = ...
2
votes
2answers
406 views

Get list id from open view page via JavaScript

I have included some javascript in SharePoint master page, I need this javascript to have access to the opened list ID. For example when I load ...