API for interacting with SharePoint from .NET, Silverlight, and JavaScript.

learn more… | top users | synonyms

0
votes
0answers
37 views

Ribbon button added via CSOM is disabled on publishing page in SharePoint 2013

We have added a custom action in the publishing page ribbon using CSOM in SharePoint 2013. The issue is this action is disabled and i can't click on it. The strange thing is it works on one site and ...
1
vote
1answer
123 views

Get Sharepoint Permissions\Roles (custom) of a user from AD Group that is part of SP Group via CSOM

SharePoint 2013 + provider-hosted app. User is part of AD group. AD group is part of Sharepoint group. Sharepoint group has custom security permissions assigned. How do I check whether user has some ...
0
votes
1answer
81 views

Sharepoint define search scope using csom

I have a sharepoint installation with multiple site collections, let's say siteA, siteB e.t.c I am using the following code to search in sharepoint using (ClientContext context = Connect()) ...
0
votes
0answers
73 views

How to get Structured Navigation on publishing SharePoint Site with CSOM

I am trying to re-create my Top navigation bar in a provider hosted MVC App. my C# public static NavigationNodeCollection GetNav() { if (HttpContext.Current != null) { ...
2
votes
1answer
33 views

How to Send return value to the caller function correctly

Hi i have a code like this. var guiD = myCallerFunction('abc'); alert(guiD);====>Line No Y function myCallerFunction(name){ //Some code here var terms = termSet.get_terms(); ...
2
votes
2answers
114 views

Error creating PeopleManager object using CSOM in powershell

I have this line in my powershell script: $peopleManager = New-Object Microsoft.SharePoint.Client.UserProfiles.PeopleManager($context) When it gets hit I receive the error: New-Object : Cannot ...
0
votes
1answer
47 views

Sharepoint 2013 - open a second modal window from a first modal window

I have an aspx page opened in a modal. On button click I need to close the current modal and open a new one or just open the new page in the same modal. Any suggestions? Below is my code: function ...
0
votes
0answers
70 views

SP2013 Adding custom webpart(sandbox) to a page programmatically using CSOM

I'm trying to add a webpart(sandboxed) to a page programmatically using CSOM. I've created a simple windows forms application and tried the below, it gives me error A first chance exception of ...
2
votes
1answer
40 views

SharePoint Online: Change properties

I am retrieving a change log for SharePoint Online site, but I am particularly interested in the who performed the change and on what item. $changeQuery = New-Object ...
0
votes
2answers
34 views

Sharepoint2013 ctx and Js : Retrieve the value of a field from a list

I'm a totally beginner and totally stuck to a point in my Sharepoint project. What i would like to achieve: part 1 : retrieve the current user's Department's name part 2 : retrieve the department's ...
1
vote
1answer
53 views

Get GUID by term name - jsom

i need to pass term name as a parameter and return the GUID of that particular term. As an example if i pass My Term 1 it should return GUID of My Term 1. var termGuid=getTermByName('My Term 1'); ...
0
votes
1answer
29 views

Query “Standard View, with Expanded Recurring Events” doesn't show all items

For Calendar list, I have created a view with type of "Standard View, with Expanded Recurring Events". This view is used to show each instance of a recurring event. So if there is an event with let's ...
0
votes
2answers
108 views

JSOM function undefined in SharePoint - Display list view items

I am using the following code to get the available items from a list view. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> ...
0
votes
1answer
119 views

how to call executeQueryAsync() to behave synchronously?

Items are saved in jumbled bcoz I am using executeQueryAsync().How to make executeQueryAsync() behave synchronously?
1
vote
0answers
34 views

Display Rating Stars

I have a page and I want to display the items' title of a list with the rating stars for each item beside it in that page. What should I do?
0
votes
0answers
22 views

Term ID by Term name JSOM

I need to do something like this. var termID=getTermIDByTermName('My term Name'); function getTermIDByTermName(name){ var ctx = SP.ClientContext.get_current(); var taxonomySession = ...
0
votes
0answers
58 views

CSOM retrieve List Item doesn't show some Lookup Key Value pairs

I try to load a ListItemCollection from my SiteCollection using CSOM C#. Therefore I use the following List rr = web.Lists.GetByTitle("MyTitle"); context.Load(rr); FieldCollection fcol = rr.Fields; ...
0
votes
1answer
40 views

Sharepoint online 2013, Move term to another branch (parent)

In Sharepoint online we can move Term manually. I need that to be done programatically using JSOM. Does anyone have code for that? I checked ...
0
votes
1answer
24 views

reuseTerm JSOM usage

Anyone familiar with SP.Taxonomy.TermSetItem.reuseTerm(e, d) ? It's there in MSDN and I guess it is to copy a termset to another termset as a sub-term. Any idea?
0
votes
0answers
31 views

Export/Import SharePoint List Template without using Microsoft.SharePoint.dll (Is it possible?)

What I'm trying to do is build a migration tool that when moving from a development environment to production environment for example, any SharePoint List references will be packaged as List Templates ...
1
vote
1answer
115 views

Does audiences work with CSOM?

If we build an SharePoint app and need to show items based on audience targeting, can we use CSOM for that? Can't find any references to it in the CSOM SDK.
0
votes
0answers
20 views

Moving a term to another parent termset JSOM

Hi i need to Move My Term 3 term under My Term 1 (need to make My Term 3 as a child term of My Term 1) using JSOM. I tried many code snippt but i was really unable to do that. Anyone else has tried ...
0
votes
0answers
21 views

Sharepoint 2013 - jcom - How to add function and increment 1 to a specific field?

The following setup is working perfectly for fetching data from my custom list... var items; $(document).ready(function () { SP.SOD.executeFunc('sp.js', 'SP.ClientContext', CustomAction); }); ...
1
vote
1answer
40 views

SharePoint 2013 - JavaScript - List Data fetch failed

I'm using the following to read data from a custom list in SharePoint 2013: var items; $(document).ready(function () { ExecuteOrDelayUntilScriptLoaded(CustomAction, "sp.js"); }); function ...
0
votes
2answers
91 views

Add hyperlink to Sharepoint list item

I need to add a hyperlink to the Sharepoint (2013) list item in one of the columns or make the list item itself as a link. I don't know how to do this. Any help is appreciated!
0
votes
1answer
116 views

Fields validation with Javascript in custom WebPart - SharePoint Online -

I'm currently developing a SandBox WebPart for SharePoint Online (2013) which have two TextBoxes. I'm trying to add the following code for validate the Email and Subject TextBoxes once the Button ...
0
votes
0answers
37 views

Unable to get the list of all SP2010/SP2013 Work Flows (OOTB and SPD) which are associated with a List using CSOM

We came across an issue while pulling the workflow associations of lists, CSOM and Splist.WorkflowAssociations will not list the workflows created through SPD and attached to list. If anyone faced ...
1
vote
1answer
139 views

Enable like function from catalog page via javascript object model - improve this?

The business need is to create a 'channel' page that will display thumbs of videos like a gallery, and I need to enable people to 'like' that content from the gallery page. (Standard disclaimer: I'm ...
1
vote
0answers
41 views

Move terms to another termset/ termstore JSOM

Hi i need to create an app which gets two inputs 1.) Term name 2.) Parent name( term-set or term-store name) once i click on a button, that 1.) term should go under 2.)parent term-set If i put ...
0
votes
1answer
20 views

Can I [safely] change the code name/EntityPropertyName of objects?

We have several lists and columns that we've renamed overtime, and some of the lists/columns also contain spaces. This makes accessing these objects with the EntityProperytName through the CSOM quite ...
0
votes
1answer
41 views

Creating client side solutions

i hear people say they want to create client side solutions in visual studio, would that be applicable in the case of visual web part? if i create a visual web part and only write javascript code in ...
-1
votes
1answer
27 views

CSOM - setting the custom list name, when attempting to receive list data

With the following code, how do I know what list I am retrieving data from? var siteUrl = '/sites/MySiteCollection'; function retrieveListItems() { var clientContext = new ...
1
vote
1answer
38 views

AverageRating is null in JSOM

I am trying to get the rating field from a SharePoint pages library in JavaScript, after using the get_item('AverageRating') it's returning null. My function looks like the following: var ...
1
vote
1answer
128 views

SP.SOD.loadMultiple Issue

I am trying to load the project context in order to access some data. I am using the SP.SOD.loadMultiple function as follows: SP.SOD.loadMultiple(['sp.core.js', 'sp.runtime.js', 'sp.js', 'ps.js'], ...
1
vote
2answers
64 views

How to get termstore GUID by giving its name

I've a term-set called My Term Set, I need to get the Unique Identifier by passing its name. How can i do that? This is the code i have tried so far but it gives undefined Please help me thanks a ...
0
votes
0answers
43 views

Change selected items order and merge using Javascript

I am now able to get the selected list items and merge its contents. Is there a way to reorder the selected items before merge? Or is there a way to get the items in the order in which they are ...
1
vote
1answer
52 views

Deleting file versions except the latest version either using JSOM or SPServices

I want to write script that gets all versions of documents in site and deletes all of them except latest version either using CSOM or SPServices. I have found some information on net but could not ...
0
votes
3answers
176 views

PeoplePicker using JSOM

Hi is there anyway to manipulate PeoplePicker using JSOM. How tho get or set value of PeoplePicker using JavaScript
0
votes
3answers
269 views

How to update Created By Author field in list SharePoint 2013 JavaScript Client Object Model

Just wanting to know how to update a user field, like CreatedBy or Author based on a users name e.g. steven.martin? I seem to have it working fine, from a user id, but not from a user name. get user ...
1
vote
1answer
73 views

Site url exceeds maximum length of 256

I'm trying to create a team site and get the following error message Site url https://myurl/sites/mylongsitename exceeds maximum length of 256. The url itself is under the 256 limit, I've also ...
0
votes
1answer
119 views

How to read terms under a particular termset

I have a termstore like below (sample one) i need to write a JSOM code to get sub terms under a particular term set As an example once i put My term set's uniquie ID i should reterive My term1,2,3 ...
0
votes
1answer
28 views

Sharepoint List Item field returning null using JSOM

Im fetching a field with multiple lines of text using JSOM and it returns null. All other fields return the correct value but attempting to get this results in null. Is there a special way of ...
0
votes
2answers
247 views

Get project custom fields (Project Server)

I am trying to access, in a project detail page, the project context via Javascript to retrieve the data of the custom fields. But my problem is that, when I try to access all the data it only shows ...
0
votes
0answers
37 views

SharePoint 2013: JavaSript Object Model - Inserting 'Reusable Content' programmatically not working

Goal: I am trying to click a button on a page that sets the 'PublishingPageContent' field on another page with data from a 'Reusable Content' list item. Problem: Whenever I go to the updated page ...
0
votes
1answer
47 views

Is it possible to write a CAML query that will update or insert an entry based on its existence?

I'm working with Sharepoint using CSOM and Javascript. I need to cache usage statistics in a List with one entry per user, updating values in a user's list entry when they interact with the site in a ...
0
votes
1answer
61 views

this.get_context is not a function when call getMyProperties

When I call the code below: script type="text/javascript" src="/_layouts/15/SP.js" /script script type="text/javascript" src="/_layouts/15/SP.UserProfiles.js" /script script type="text/javascript" ...
0
votes
1answer
104 views

SharePoint 2013: JavaScript Object Model - Caml Query where list item is selected

How could I use a caml query to only get the list items that are selected using the JavaScript Object Model? <Where> <Eq> <FieldRef Name= ??? /> <Value ...
0
votes
2answers
51 views

Get the title of the item in detailed view (JavaScript)

When I click on an item in a list I get to the detailed view. There I need the title of this item. I could find it in the title of the page (when you look on the tab of your browser) but I think it's ...
0
votes
1answer
32 views

Equivalent of SPRelativeDateTime.GetRelativeDateString in CSOM sharepoint 2013

What is the equvalent API for SPRelativeDateTime.GetRelativeDateString in sharepoint 2013 Client object model using (SPSite site = new SPSite("http://your.site")) { using (SPWeb web = ...
1
vote
0answers
44 views

Creating fields InternalName or StaticName

I'm looking to copy fields and views from one site to another. I get the message that column does not exist and believe its down to when they are created. I'm using the below to create a field ...