2
votes
0answers
43 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 ...
0
votes
2answers
28 views

JS ClientContext return undefine when deleteObject

I'm trying to delete a list item from a SharePoint library via JavaScript with ClientContext. Unfortunately I don't have access to the ID of the item that's why I use the Title and I can not delete ...
2
votes
2answers
73 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 ...
2
votes
1answer
38 views

executeQueryAsync fail on Chrome

I am using SP.ClientContext (JS library) to update some item's fields. It is working fine on IE but on Chrome I get this error (displayed as alert): Request Failed, status code 0 text '' The ...
1
vote
3answers
170 views

Sharepoint- Client Object Model - Javascript - How to check if a particular file with same name exists in a document library folder

I am using javascript sharepoint 2013. I want to know how to check if a file exists in a folder, before i upload. Here's my code // Folder Name - folder into which I need to upload var ...
0
votes
2answers
33 views

Get the field “Created”

I have a list "Consult", and I want get the field "Created" this is my code: function consultWorkOrder() { try { var customlist ; var clientContext = new ...
0
votes
1answer
57 views

SP2013 online : set_formDigestHandlingEnabled Error

I get the error : Object doesn't support property or method 'set_formDigestHandlingEnabled' when I try to get the current SPContext object from javascript code in an Office 365 site. I am ...
0
votes
2answers
116 views

get Library document URL using Javascript client object model

I am working with SP.js to get data from a SharePoint library. Below is the code i am using: var clientContext = new SP.ClientContext(); var oList = ...
0
votes
0answers
43 views

Update a rating scale field of survey list using JavaScript

I have created a survey list which has 3 columns. One column is of type rating scale with value 1-5 . Using JavaScript I'm able to update the first two columns. But not able to do so for the rating ...
0
votes
1answer
43 views

Date functions with $select in REST API

I'm using the following REST call to get the data. Here is the url structure: SiteURL+'/_api/web/lists/GetByTitle(\''ListTitle+'\')/items?$select=AlternateThumbnailUrl,Title,Created this is ...
0
votes
2answers
75 views

Jquery to display date in MM/DD/YYY in sharepoint client object model [closed]

In My sharepoint list i have a Duedate if type DateTime.Using Client object model when we fetch the value from this Field, it is displayed in the below format(Mon Jun 23 GMT+0530 2014).How to convert ...
0
votes
1answer
221 views

CSOM Javascript - when executing query on multiple lists getting error - SharePoint 2010

Is here any SharePoint expert, who can help me find out, why I am getting error on lists queries? I am trying to fetch data from multiple list asynchronously, but I am getting following error: The ...
1
vote
2answers
241 views

JS CSOM to redirect to another SharePoint URL

I have an application page which takes some inputs for list creation. Based on these inputs, i am using JavaScript Client Object model to create a new list. Once the list is created a notification ...
0
votes
2answers
81 views

Get SP.ListTemplateType enum value using JSOM

I am trying to create a new list (based on a dropdown menu selection) using JavaScript Client Side Object Model. var typeList = "SP.ListTemplateType." +listTemplateType; ...
0
votes
2answers
80 views

Javascript Client Object Model Update List Items (only some items updating)

I am using a JavaScript button to set a Field-2 on each selected list item from "false" to "true". It first checks if Field-1 is empty, and if it is, sets Field-2 to true. The relevant code is as ...
0
votes
2answers
113 views

Compare current user login name with four custom sharepoint list 2010?

I have 4 custom list (test A, Test B, Test c,test D). I need to find current user login belongs to which list in sharepoint. if current user belongs to Test b list i need to show pop up "U belong to ...
3
votes
1answer
215 views

Check if logged in user is member of AD group with ECMA script SharePoint 2013

There is active directory group added to SharePoint group. How would we can check that the logged in user is member of that active directory group using ECMA script?
1
vote
2answers
213 views

How to get title and url using allproperties

How can I get title and url using allproperties? I can get custom proeprty but do not know how to get title and url. I am not able to know as why I get the alert twice in the following code, ...
3
votes
1answer
113 views

Get distinct values via mechanism used when clicking “Show Filter Choices” on a Sharepoint list using Javascript

As many other people on this site seem to need, I'd like to get an array (or equivalent) of the distinct values in a field for a list. The canonical way of doing this is to retrieve the entire field ...
0
votes
2answers
373 views

Add item to list using button

I try to create button that will be add item to the list. Unfortunately I do somethings wrong. My programming skill's are at beginner level. I have list "List" with only one field Title (for test) - ...
1
vote
2answers
2k views

Unable to get property 'get_current' of undefined or null reference

$(document).ready(function () { var count = 0; retrieveCurrentListProperties(); function retrieveCurrentListProperties() { clientContext = new ...
0
votes
1answer
91 views

JSOM CSOM query only get dates that are not passed todays date

I have a list which contains an end date, I want to query this list and only collect the items which end date have not passed todays date. Once this has happened I want to count the new queried table. ...
1
vote
1answer
228 views

How to access the data from Manage User Profiles?

We are have sync the SP with AD using Active Directory Import for SharePoint 2013. All the users have been picked up into the Manage User Profiles and new user properties have been added to the ...
0
votes
1answer
39 views

problem getting date time

I am using the CSOM in javascript. I have a list which contains 3 text types and 2 date types. When I use: var listEnumerator = this.listItems.getEnumerator(); var collection = ...
0
votes
1answer
79 views

CSOM query certain date

I have a list that has an end date in. Is there anyway to filter out the dates that are passed todays date? function retrieveCurrentListProperties() { clientContext = new ...
0
votes
3answers
575 views

count items in a list javascript CSOM [duplicate]

I am wanting to count the number of items in my list. Using CSOM in javascript I have tried it but my code doesn't work. Where am I going wrong. Here is my code: var clientContext = new ...
0
votes
3answers
561 views

What is best practice to add list item in SharePoint 2013 javascript object model?

I need reference code to add an item to a list programmaticaly via javascript object model in SharePoint 2013.. Got many solutions online but not sure what js to include, whether ajax calls are need ...
2
votes
1answer
524 views

Can we access list from other site collection sites using javascript object model?

ECMAScript object model can only be used in SharePoint sites. So you can’t use this object model in an asp.net site to access SharePoint resources deployed in another url as this is cross-site ...
0
votes
0answers
24 views

Linking a js file into a blank page in sharepoint then count how many items in a list

I have created a new page on my sharepoint site. I have embedded some html using the embed code <!DOCTYPE html> <html> <body> hello </body> </html> I have a js file ...
2
votes
3answers
1k views

using CSOM to retrieve fields in a list in a view

I am trying to use the CSOM to retrieve all the displayed fields in a particular view. I require to know the field type and field internal name. I can not do: var list = ...
1
vote
1answer
364 views

ECMAScript moveTo move document to another web in same site

I have studied and used the following post to attempt to move a document: moveTo and moving documents from one library to another This works perfectly when moving documents to different libraries in ...
0
votes
0answers
17 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 ...
2
votes
1answer
246 views

How to Pass parameters from Javascript Client Object Model to Report Viewer Web Part?

I have some SQL Server Reporting Services (SSRS) reports that take parameters. I am displaying these reports via the SSRS Report Viewer Web part on a site page. I have the parameters that are needed ...
0
votes
0answers
26 views

How to access another web, by name in client object model

Iam in site B . There is another site named A .I want to access a list A of site A from site B using client object model. Can I access it I am using below code. var context = new ...
0
votes
1answer
2k views

How to get the managed metadata column value in a list client object model

I am trying to get values from a list for different columns like Title ,ID ,Region Where Region is a metadata column . I am able to get all the values except metadata column values . Pleas tell me ...
1
vote
1answer
527 views

Not able to fetch Term store and related terms using client object model

I want to fetch termstore, Termsets and related terms.However, Iam not even able to fetch the termstore. Below is the error message. TypeError: termStores is undefined termStoresEnum = ...
3
votes
3answers
1k views

How to find the current folder through JS COM?

Is there a way to get a reference to the current folder through the JS COM? It doesn't seem as though it can be done with SP.ListOperation. And by current folder, I mean the folder the user is ...
1
vote
1answer
135 views

SP2010 Javascript Object Model: programmactially add calculated column to list

I am building lists and adding fields via the following. I am wondering if I can add a calculated field and how you set the formula in this (or another method): function onCreateRootCause() { var ...
0
votes
0answers
27 views

How to get “Shared With” count of a list item or document using CSOM

Is there any way to get the count of "Shares" on a list item. I've a requirement to show "share" link along with the share count like "share(10)", Can I do it using javascript?
3
votes
0answers
135 views

Is it possible to retrive CRM online data from SharePoint Online using javascript? [closed]

So I would like to get data from Microsoft Dynamics CRM 2013 Online into my SharePoint Online SharePoint Hosted App. Is this possible to javascript only? Can I use the same Cross Origin Query ...
0
votes
1answer
98 views

SP2010 JSOM: when creating field using javascript, how to define date only instead of date & time

I create a list using: function createProjectList() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); var listCreationInfo = new ...
2
votes
4answers
1k views

How to retrieve data from one executeQueryAsync and use it in another executeQueryAsync within the same ClientContext

I want to add item to list where Title is equal to current user ID by JavaScript Object Model. As far as I know I first need to get currentUserID and I wrote the following code currentUser = ...
5
votes
1answer
3k views

Check if user is in a specified group

I would like to check with JavaScript if the current logged user is in a specified and specific group (for example called "Admins Group"). How can I do? Thanks
3
votes
2answers
298 views

How do I programatically change the default value of, or remove from default view, title column using javascript?

Using the JSOM in SharePoint 2010, if I am creating lists programmatically using something like: this.myField= oList.get_fields().addFieldAsXml('<Field DisplayName=\'Key\' Type=\'Text\' />', ...
1
vote
1answer
1k views

Retrieve Iist Item column values with column names on Item click, JavaScript

I need to retrieve List item column values with column names on item click. In SP2010, I have a XSL which calls the JavaScript. I have sent the list item id through the XSL into the JavaScript ...
0
votes
0answers
105 views

Filter/compare two arrays from CAML query

I'm using JavaScript/Client Object Model to retreive some data by CAML query. I've 2 CAML queries. One retrieve all data from a specified column. The other query retrieve data from same column ...
0
votes
1answer
55 views

Issue when getting library GUID through JavaScript

I'm using SharePoint 2010. I need to get some SharePoint data on a list item hyperlink click. Inside the JavaScript file there is a method getLibraryGuid() I get the targetLibrary value with no issues ...
3
votes
2answers
631 views

View custom field property value using JavaScript

I'm using SharePoint 2010. Need to retrieve the Custom field property values using a JavaScript. [Trying to do this during item click in the SharePoint list item view. I call the JavaScript on the ...
1
vote
1answer
466 views

How to use JavaScript to get form data, and add it to a list

Obviously it is possible to gather data from a form using JavaScript. Microsoft also claims that is possible to add items to a custom list using JavaScript, although I have not gotten that to work. My ...
1
vote
3answers
1k views

Using CSOM to get list item count for multiple lists

I am trying to create a function which should loop through all lists on current web and display their current item count. My code so far: <!-- language: lang-js --> ZN.updateDocumentCount = ...