Use the JSOM to retrieve, update, and manage data in SharePoint.

learn more… | top users | synonyms

0
votes
0answers
27 views

How to update List item Managed Metadata Column with JSOM

I have simple list with one title column and one Metadata Column, and iam trying to update my list item but getting an error: I found this article on google, and i have tried to follow it by ...
0
votes
1answer
44 views

Using JSOM to get information from host web error “The collection has not been initialized”

I'm using the following code part to access the host web from a sharepoint add-in : var ctx = SP.ClientContext.get_current(); var factory = new SP.ProxyWebRequestExecutorFactory(this.appWebUrl); ctx....
0
votes
1answer
18 views

SharePoint 2013- Anonymous users not able to read from Termstore

I have a public facing anonymous site in SharePoint 2013 on Premise. I have written some JSOM to read terms from Termstore .For authenticated users this works fine but for Anonymous users , it throws ...
3
votes
2answers
46 views

Creating SharePoint List form with HTML

I want to create a form to be filled by users and when the form is submitted I will store the input data in a SharePoint list. So far I have been using either default SharePoint list forms or Infopath ...
0
votes
1answer
14 views

How to use JSOM to retrieve list of people who directly reports to a given manger

I am trying to write a JSOM to return list of people who report to a given person (manager) based on the Org Chart structure in SharePoint. I know that context is able to load things such as peers ...
0
votes
1answer
84 views

Get the label name of a term through JSOM

I am trying to get the Label(Title - shown in the Navigation UI) of a term through JSOM. I have successfully got the ID of the term. Now I got stuck in getting the Label of term using ID. I have ...
1
vote
0answers
36 views

Find friendly url from term guid using javascript

We have a cross-site publishing setup with a managed navigation from terms that the items are marked with. On the item pages I have the term or terms that a given item is marked with. I have both ...
0
votes
1answer
8 views

Get properties of subfolders

I'm trying to get the properties of the subfolders using jsom. Let's say: name, url, etc I'm using this: ... var ctx = new SP.ClientContext(currentSite); web = ctx.get_web(); list = web....
1
vote
1answer
44 views

Bug in Updating SharePoint list via javascript

here is My code : console.log(query); camlQuery.set_viewXml(query); collListItem = oList.getItems(camlQuery); clientContext.load(collListItem); clientContext.executeQueryAsync(function (sender, args) ...
0
votes
0answers
8 views

Unable to set default value in managed metadata column for document created using Word Online

I am working on a document library where I have associated a custom content type. This content type has a managed metadata column. I need to set the default value for this column. I have used JSOM ...
3
votes
1answer
44 views

creating folder in document library using jsom

I am trying to create a new folder inside a document library using JSOM, below is my code var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/folders"; function getFormDigest(webUrl) { ...
0
votes
2answers
54 views

filter ListView using RestApi in sharepoint APP

Please let me know is there any way to filter list inside listview using restapi Example: TestList And below is my custom search:(currently it is configured on Title field) Now after filter(Title=...
0
votes
2answers
31 views

Add default value to the site column inside content type using javascript Sharepoint 2013

I am creating some site columns using javascript. And also I am creating content types. I am attaching these site columns to the content type with the <FiedRef> tag. But I want different default ...
-1
votes
1answer
43 views

Convert String as Property

var listType = document.getElementById('ddlLists').value; "ddlLists" is an Id for a dropdown list and "listType" variable is having the selected dropdown list item as string type. i want that the "...
1
vote
1answer
47 views

How to Save Manged Metadata value in List using JSOM or REST…?

As i have understand it by googling a litle, that its not posible to use REST for Taxonomy fields ? I was not able to update my list doing it by http REST . But it should be posible with JSOM. How ...
0
votes
0answers
7 views

Getting error on JSOM Taxonomy getRawText() method

Iam trying to get selected/picked value from my Taxonomy Picker field, without any luck. Getting error on line getRawText, Error: Error: inputFieldId is null My code looks like: function test(...
0
votes
0answers
10 views

SharePoint App-Part Getting error when setting Taxonomy ControlObject

I am getting error on line below TypeError: Cannot read property 'ControlObject' of undefined var taxCtlObj = new Microsoft.SharePoint.Taxonomy.ControlObject(thisDiv) How can I fix this issue?...
1
vote
2answers
38 views

Office365 PnP Taxonomy Picker: How can i get selected/picked value from Taxonomy Picker

How can i get picked/selected value from Taxonomy Picker "input". I have have implemented my Taxonomy field like showed in this article And its working fine, the only thing i cant figure out is how ...
0
votes
0answers
14 views

getting error: Uncaught TypeError: e is not a function init.js:1

Uncaught TypeError: e is not a function init.js:1 Getting this error when I run my SharePoint hosted App-part. Why am I getting this error? here is how I am loading the scripts: <SharePoint:...
0
votes
1answer
42 views

How to implement Taxonomy Picker in SharePoint Provider-Hosted App (app-part)

Iam trying to implement a Taxonomy Picker in my SharePoint Hosted App-Part. And i found i great article explaining how to do that, but with out any luck. Should be pretty simple as they have explained ...
0
votes
1answer
32 views

Start SP 2013 workflow using JavaScript object model does not start WF

I am using a SharePoint 2013 state machine workflow. In my page I attempt to start the workflow using below both ways Method 1 - using Item ID & WF subscription name var wfName = "notification ...
0
votes
1answer
21 views

Getting Error: Uncaught ReferenceError: Type is not defined

I am getting these errors below when i run my SharePoint Add-In (app-part): And i define my scripts like this in my index.html: <script type="text/ecmascript" src="/_layouts/15/sp.core.js"&...
1
vote
1answer
64 views

Getting regional settings of current user using JSOM or JavaScript

I want to fetch the regional settings of currently logged in user NOT the current web. Reason being, the regional settings and language settings is pushed through user profile service (or user might ...
1
vote
2answers
47 views

How to update list item with lookup (People and Group) column using REST post method

iam trying to update my list item with "People and Group" column without any luck. It is a simple list with 4 columns/fields (Title, Description, ProsessOwner, ProsessContributer), and iam not able to ...
0
votes
1answer
22 views

TypeError when trying to create a Document Set with JSOM

I am attempting to create a document set in sharepoint online using JSOM triggered by a button. I've found the guides referenced here on the subject, but I can't seem to find the issue in my code. ...
1
vote
2answers
39 views

How can I use REST API to filter using multiple columns in UserInformationList

How can I filter multiple columns in REST API using Name/Username when running GET request to UserInformationList? Here is my Query: var getPeoplePickerSuggestion = function(searchKey) { ...
3
votes
1answer
30 views

Add Site Name to column in NewEdit Form using Client object model

I've been able to Get the site name (adding this to editform via CEWP) but I don't know how to modify the script to be able to update the field ProjectName with the Site Name. Any ideas? Thanks so ...
0
votes
1answer
51 views

JavaScript just running in Edit mode

I have a view form in a list. I want to add a dropdown and populate that dropdown from Another list, so I added a scripteditor in my viewform and added the code below. I can get my code to run when I ...
1
vote
1answer
53 views

REST API Filter by LoginName from user list not working

I have a list A, which has a column owner of type "Person or Group". I am using REST API to query this list(using jquery). I would like to use column owner to filter records by username. I have a ...
11
votes
2answers
689 views

Which one is faster CSOM or JSOM

Understanding which one has better performance for performing CRUD operation in SharePoint List, CSOM or JSOM?
1
vote
2answers
56 views

Script Editor webpart works correctly only in editor mode

I need customize NewForm for list for automatical filling some fields based on user's profile data. I add Script Editor webpart to NewForm.aspx page and write into this code: <script type="text/...
0
votes
0answers
36 views

Is Authorization needed while requesting Excel online Rest API from Sharepoint Add-in JSOM?

We are trying to access an Excel spreadsheet from a sharepoint add-in. We are using JSOM in this add-in. Intention is to populate the excel spreadsheet with some flags before user can download it. So ...
1
vote
0answers
23 views

Get query rule name by GUID on the client

I'm using JSOM to iterate through search results on SharePoint 2013 search center. There is a top level object ResultTableCollection which contains one or more QueryGroup objects, which, in turn, ...
0
votes
1answer
59 views

Overwrite with SP.MoveCopyUtil

I can't get the overwrite paramreter in SP.MoveCopyUtil.copyFile to work. I can't find any good documentation on it either. Heres the code. appObj.copyFile = function (source, path, fileName) { var ...
0
votes
0answers
13 views

Enabling item scheduling on a publishing library via JSOM

Alright, I'm trying to enable item scheduling similar to this this post but via JSOM in sharepoint online through a sharepoint Add-in/App. From the web console I've already looked into properties of ...
1
vote
1answer
70 views

Adding folder to Document Set programmatically JSOM SharePoint 2013

I am trying to add a folder to the document set but the folder got created at the parent document library. Can somebody help me to find out what am i doing wrong ? Following is the code: var ...
1
vote
1answer
100 views

How to retrieve and display Sharepoint calendar events using JSOM (example)

How to retrieve and display Sharepoint calendar events using JSOM ?
0
votes
0answers
11 views

Multiple WebParts in auto-sized Modal

I want to add two WebParts (listViews) to a popup modal and i want it automatically sized to the size of the two WebParts. I already tried adding iframes with the desired WebPart URLs to the modal, ...
3
votes
1answer
39 views

JSOM bulk SP.ListItem creation: get created Ids

I'm using this approach to bulk SP.ListItem creation: var ctx = SP.ClientContext.get_current(); var oList = ctx.get_web().get_lists().getByTitle('listTitle'); myObj.forEach(function(d,i) { var ...
0
votes
0answers
17 views

JSOM / REST Modify Field EntityPropertyName

I can't figure out how to modify a SPFieldEntityPropertyName, perhaps it be unachievable using just SharePoint javascript API. JSOM context.web.get_fields() setter methods are: Note: I think ...
0
votes
0answers
33 views

JSOM returns empty object on some pages

I've got some JSOM code that I use in two forms: a display form and an edit form. On the display form, DisplayTicket.aspx, it works exactly as expected. On the edit form, it runs and the JSOM call ...
3
votes
1answer
45 views

Sharepoint Jsom return wrong time

I have custom column, interview date, in custom list and I am storing date and time in column. When I fetch interview date data then it will return wrong time. If I store value in field 26 May 2016 ...
0
votes
1answer
22 views

Getting the site collection url for 2007 to O365

I'm trying to figure out how to get the site collection url for any version of SharePoint, not sure which method would be the best I figure using window.location probably isn't reliable, ...
10
votes
3answers
877 views

Using jQuery $(document).ready() in JavaScript Object Model

I've been using with great success the $(document).ready(function() { FunctionName(); }); in a SharePoint WebPart code snippet to fire off COSM CAML queries using JavaScript to build various ...
0
votes
1answer
38 views

Set the SiteUrlLogo using JSOM in SharePoint 2013

Is there a way we can set the SiteUrlLogo using JSOM in custom Master Page using visual studio?
1
vote
1answer
53 views

SharePoint 2010 - REST - retrieve group members

I am building a form using REST and am trying to create a drop down based on a person/group field. '..ListData.svc/listNameFieldName' does not seem to work for those field types and accessing '.....
0
votes
0answers
27 views

How to Create New Field with Specific different Internal Name and Display name in SharePoint 2013 Client Object Model

When creating a new field using Fields.AddFieldsAsXml, I used below code : <Field Type='Text' DisplayName='Employee Number' Name='EmpNumber' /> But the Internal Name of the created field. "...
1
vote
3answers
70 views

Errors when reading a lookup field of a list item using the JavaScript Object Model

I changed a field from being a single line of text, to being a lookup (still only displaying a single line of text, but it's fetched from another list. The field's internal name is Status. This is ...
0
votes
2answers
69 views

Get the Termset with Javascript and nothing return

We are working on a SharePoint 2013 on-premise farm. I am trying to return the termset object with ID 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx'. Here is my script. I add a content editor webpart and insert ...
0
votes
2answers
28 views

SharePoint Designer 2013 Page accessing ClientContext issue

I have created a new aspx page from SharePoint Designer 2013 and I have following scripts added on my page head section. The page does not belong to any app, it is separate Wiki page, added from ...