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

learn more… | top users | synonyms

0
votes
0answers
33 views

How to use CAML with CSOM for getting users in SP2013?

I want to get all the users in CSOM SP 2013 in javascript, but I don't want all users. I want to filter them by CAML. This is what I have so far which filters by first name is Tom, but the CAML is not ...
8
votes
6answers
29k views

Get Site Collection full URL using javascript

I want to get the URL for my site collection. One way I thought I could do it was using the window.location in javascript and getting it that way. I know that you can use ECMA script and the client ...
0
votes
5answers
221 views

Retrieve data from taxonomyfield using jsom gives error

I have a managed metadata type column in my document library. I need to get the data from this column by using jsom. But whenever I try to get the values it gives me error. The code and error are ...
3
votes
1answer
1k views

Create Multiple List Items with One Function

Is it possible to create multiple list items with one function in JavaScript / ECMAScript? I know that a single item can be created with the code below, but would like to know if it is possible to ...
1
vote
0answers
24 views

How to search in custom metadata columns of document library using QueryService object

I have a SharePoint Library 'Contact' In this library i have created some custom column. Have gone through all the steps of 1st Full Crawl, automatic generation of crawl properties, creation of ...
0
votes
2answers
286 views

Get User id from people picker client side

I have created people picker on client side using SPpeoplepicker.js. $("#peoplePickerDiv").spPeoplePicker(); Everything works perfect all user display in people picker and i can select multiple ...
0
votes
0answers
12 views

ServerObjectIsNull not working correctly?

I'm very confused about the usage of ClientObject.ServerObjectIsNull. In our current project we use this property very often to validate if an artifact is already existing on server side. Until now it ...
2
votes
2answers
301 views

JSLink Client-side rendering

I need to render some fields client-side, I followed this guide: Client-side rendering but this code is not working: (function () { // Create object that have the context information about the ...
1
vote
3answers
2k views

Add List Item with managed metadata field through JSOM

I have a simple scenario, where I've a list with some custom content types. Among other fields, i have a managed metadata field. I want to add a new item in the list through JSOM and this is where I ...
2
votes
1answer
81 views

Use a colleagues' browser settings to detect their time zone and update the date format and time to reflect the time in their time zone

In the Events web part, the date displayed should reflect the date for the event based on the user’s time zone. Can this be achieved by client side This is the sample events webpart: I have till ...
1
vote
0answers
40 views

Bulk Create folders in document library using client object model

I want to create folder on SharePoint document library using client object model (C#). Below is the code which does that. ContentTypeCollection listContentTypes = list.ContentTypes; ...
0
votes
1answer
77 views

How to get Sharepoint 2013 variation URL?

I want to create a toggle button for variations, so that when I am on the en or fr page, and I click the button it takes me to the other page. But I can't just change the en to fr, for example, ...
0
votes
3answers
68 views

How to update list items using JavaScript Object Model in SP 2013

I am trying to update list item's value through JavaScript object model in SP 2013. When I call set_item('fieldname','mvalue'), it does not throw any error, but it fails to update. How to ...
6
votes
3answers
35k views

Get current user in Client Object Model with javascript?

var ctx = new SP.ClientContext.get_current(); var web = ctx.get_web(); ctx.load(web); var user = web.get_currentUser(); alert(user); I used above code to get the current user using JavaScript, but I ...
0
votes
1answer
1k views

Getting fully qualified FieldUserValue instead of actual user name from SharePoint

I'm working on my first C# program, and it's a pretty simple program that uses a view of a SharePoint page to go through and delete things that are older than 5 days on that page. Before deleting the ...
0
votes
0answers
24 views

Default Service account in SharePoint

What does the default service account property means in the SharePoint farm? Also, what is the difference between default service account and farm administrator account, if both are different? I'm ...
1
vote
1answer
1k views

Access ListItem.Properties from Javascript COM

Is there a possibility to access the ListItem.Properties from the Javascript COM? All I'm seeing is the possibility to read all Fields. There also is the funny [SP.ListItem.LoadExpandoFields()][1], ...
0
votes
2answers
787 views

Import bulk data (over 5000 List Items) into SharePoint

I have an Microsoft Office 2010 AddIn which imports Data into SharePoint. The tool creates a Dictionary with over 5000 Values. Every Value is a C#-Class with Data and represents a SharePoint List ...
0
votes
1answer
6k views

Get document library folder & files via client object model

I have a SharePoint Library and I want to traverse all folders, sub folders and files of it using client object model. How can this be done?
0
votes
0answers
93 views

Set client side choice field to stored value via JSOM

I am using Angular on top of SharePoint for an application. One of the fields I have is a choice column. I am able to get the values and store them in SharePoint/accessible via REST in my create form, ...
4
votes
4answers
4k views

Sharepoint 2013 Client Object Model file larger than 2 Mb exception

I am new to Sharepoint and Client Object model. I am stuck with a problem and not been able to fix the issue. I want to upload files more than 10 MB using Client Object Model in Sharepoint 2013. I get ...
0
votes
1answer
168 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
0answers
16 views

The given key was not present in the dictionary while adding RoleAssignment To Group

My snippet should get a Group from a production SC and copy it to Test(same) SC. Until this point, everything works like a charm, group is created, Owner set and People copied to the with no ...
1
vote
4answers
670 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
2answers
51 views

ListItem.get_id() return “-1” after adding value in custom list

I am trying to add value in custom list of SharePoint using COM and Javascript. Code work file but i can't see any item added in list. also i got id of recently added item is "-1" This is my code. ...
2
votes
2answers
737 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 ...
0
votes
1answer
134 views

Install app from SharePoint store via client object model

I'm looking for a way, how I can install app from SharePoint store to my site in Office 365 using Client Object Model. In Object model I found method Web.LoadAndInstallApp. It work if I put app from ...
0
votes
0answers
11 views

How to connect to ping federate site(sharePoint 2010 sites) from a tool which runs on windows machine?

We need to sync two sites. One is intranet SharePoint 2010 site and other is external SharePoint 2010 site. The external site uses pingfederate authentication. We need to run a tool to synchronise ...
1
vote
2answers
168 views

Get SharePoint List data & Bind to Gridview by Client Script

I need to get data from SharePoint List using Client Script (JavaScript) and bind same data to GridView using Client Script (JavaScript, JQuery, etc...) kindly suggest me on this.
0
votes
0answers
73 views

How to get Groups RoleAssignments with COM

I'm trying to retrieve Roles Assignments and SPRoleDefinitionBindingCollection from a Group .Probably, I'm using the wrong method to that. The RoleAssignment groupRoleAssignments = ...
1
vote
2answers
1k views

Create a document in SharePoint Online using CSOM

I need to create several documents in my SharePoint Online library. I am using the following code to upload an existing file to a library: ctx.Load(ctx.Web.Folders); ...
1
vote
2answers
1k views

Get userProfile mail by SP.FieldUserValue

What I want Simply - the user's profile information to obtain the mail adress. What I have A SP.FieldUserValue object filled with the user which mail I want to obtain. Approach MailContact: ...
1
vote
0answers
90 views

How to load Group.Owner properties using CSOM

When I try to load owner = TargetSite.Web.EnsureUser(grp.Owner.LoginName); I got the exception : The property or field has not been initialized. It has not been requested or the ...
4
votes
1answer
591 views

SharePoint and Javascript - Get content types for list

I have been using the JSOM with SharePoint 2013 and am trying to get the content types of a list to iterate through, and am having no luck. First, while the success handler is being reached, the ...
0
votes
1answer
38 views

Activate Cross-Site Publishing with CSOM

We are currently evaluating on how to enable/configure Cross-Site Publishing with the usage of CSOM. When using Server Side Object Model (SSOM) the documentation recommends to use the ...
0
votes
0answers
15 views

Client Object model does return all Groups

I'm trying to build a Client App The retrieve all groups By client O M .But I notice that it doesn't return all groups into my site. I have tried build the same code Server Side on Machine server ...
1
vote
1answer
366 views

How to get the distinct values from sharepoint list using GetListItem and bind to dropdown?

I am Passing the XML for getting List item and binding to dropdown. Here i have shown the code.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...
4
votes
3answers
1k views

Get webpart's Zone Id via CSOM

How to get Web Part Zone Id via CSOM? WebPart has property ZoneIndex but no ZoneId while WebPartDefinition has method MoveWebPartTo(string zoneID, int zoneIndex) but lacks methods to retrieve the ...
2
votes
3answers
7k views

get current user info using jquery ,REST and csom

My goal is to get the login name and picture for the current user. I am using SharePoint 2013 Foundation. I tried three method and non of then worked correctly: This is with jQuery SPServices: ...
5
votes
3answers
4k views

How to enable publishing feature using CSOM?

How to enable site collection publishing infrastructure and site publishing features using CSOM?
0
votes
3answers
252 views

Stop workflow associated to a list via JSOM

I want to stop a workflow when user clicks on the Cancel request button. To achieve this I am trying with the JSOM code. My code as follows SP.SOD.executeOrDelayUntilScriptLoaded(function(){ ...
1
vote
1answer
36 views

Client Object Model RoleDefinitionBindingCollection.Remove not working

I'm using the Client Object Model and trying to remove a specific RoleDefinition from a RoleDefinitionBindingCollection in a RoleAssignment. This is the code I'm using: Web web = context.Web; ...
1
vote
2answers
1k views

How do I get the URLs of files attached to items in my list?

I'm using the CSOM to get my SharePoint list. I need to loop through it and get the URLs for the files attached to each item in the list. C#: SPContext spctx = new SPContext("news"); List news = ...
0
votes
0answers
53 views

Disable “Require Use Remote Interfaces permission” using power shell

I want to disable "Require Use Remote Interfaces permission" of web application using power shell script.
5
votes
4answers
7k views

Query SP2013 Managed metadata term store

I was wondering if it is possible to query the Term Store via the REST API or Javascript Client Object Model in SP2013. I can't quite seem to work out the naming scheme for the REST API to discover ...
5
votes
5answers
7k views

Accessing Terms in Term Store using JSOM in Sharepoint 2013

I want to display the terms from a term store using Javascript Object Model. How can this be done?
11
votes
4answers
17k views

How can I use the SharePoint Javascript Object Model from a plain HTML page?

I would like to use the SharePoint Javascript Object Model from a "plain" html page (ie, not an .aspx application page etc.) Is this even possible? If so, what scripts should I reference? I've added ...
3
votes
2answers
929 views

Mocking Client Object Model's ClientContext with Moles

I've been tasked with writing a small C# tool to fetch and fiddle with some Sharepoint 2010 items using the Sharepoint Client Object Model (COM). The code will typically have something like this in ...
0
votes
0answers
27 views

Can I export Web Part Content to a PowerPoint presentation using Client Object model?

I'm trying to develop a Client Side webpart which contains an export button. (PPT Icon). On clicking the content from the Web Part should be saved as a powerpoint presentation in the local computer. ...
3
votes
0answers
330 views

Use CSOM with ADFS credentials from Single Sign-On enabled ASP.NET MVC app

I have the following setup: ADFS 3.0, SharePoint 2013 and the custom ASP.NET MVC app. Both SharePoint and MVC app are configured to use Single Sign-On from ADFS, so once user is logged in via ADFS, ...