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

learn more… | top users | synonyms (1)

1
vote
1answer
394 views

Syntax for including fields dynamically in CSOM query?

What is the proper syntax for including fields dynamically in a CSOM listitems query? For example, this would apparently work: foreach (string field in fields) { clientContext.Load(items, includes ...
2
votes
1answer
320 views

Programmatically trigger “New document” action in a document library

I've been asked to check if it is possible to trigger the creation of a new document linked to a content type. Like, to make it simple, you have a webpart, a button, you click it, and it opens the ...
0
votes
1answer
428 views

Client Object Model to Retrieve UserProfileAttribute

we can get directly user information by using Server object but how to get this by using Client object model ?
0
votes
2answers
531 views

List of Sites and Subsites in the Given URL

How do I convert this into Client Object Model, please. I have no full SP installed on the Machine. I just need the list of sites and subsites in the Given URL.. public List<String> ...
0
votes
1answer
174 views

Taxonomy control in SharePoint hosted app

I am creating an SharePoint hosted app. In that I have to use Managed MataData from my list. In this I am getting the Metadata from my list column to my Taxonomy control. I have find some post but I ...
1
vote
1answer
175 views

How to get root of variations by client OM (JS)?

Let say I have sub-sites on my "main site" (which is not root of site collection), like Home sub-site, About, Contact. The "main site" is actually language variation of another site. In another words ...
0
votes
1answer
298 views

Cascading lists drop-downs in SharePoint Designer (no server-side code) without postback

I've created cascading drop downs populated from SharePoint lists, by following this post by Lars in SharePoint designer without using code, it works fine, my issue is that the secondary drop down ...
0
votes
1answer
102 views

CSOM Form based authentication Security issue

I'm new in sharepoint development, I was looking for authenticating users via CSOM by using forms based authentication and I found below code. ClientContext ctx = new ...
1
vote
1answer
197 views

How to get url of file after uploading to document library?

How do you return the URL of a file after it has been uploaded to a document library, using the default upload page? Returning the text from the "inputFile" textbox from the upload.aspx page would ...
1
vote
1answer
128 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 ...
2
votes
1answer
798 views

client side people picker validation

I've built my people picker using the normal method for client side: // Render and initialize the client-side People Picker function initializePeoplePicker(peoplePickerElementId) { // Create a ...
0
votes
0answers
26 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
120 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
89 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
1answer
690 views

Get ContentType Name in Client ObjectModel GetItems call

I'm using the SharePoint 2010 Managed Client Object Model to retrieve a list of listitems: string formattedDate = theDate.ToString("yyyy-MM-ddTHH:mm:ssZ"); CamlQuery absenceQuery = ...
2
votes
4answers
960 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 = ...
4
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
4
votes
1answer
306 views

Can i use sharepoint 2013 client object model for SP 2010

I am working on a product. Our product is built on top of .NET framework 4.5. We use Sharepoint client object model (v14.0.0.0) for communicating with Sharepoint (both SP 2010 and SP 2013). This works ...
3
votes
2answers
285 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
26 views

set properties for ShimFileCreationInformation object

I am writing some unit test cases using fakes framework. I am using an object ShimFileCreationInformation from Microsoft.SharePoint.Client.Fakes namespace. Now, I pass this object to a function. ...
2
votes
2answers
367 views

How do I get a collection of document libraries using Javascript CSOM?

I'm working on an UI feature for my SP2010 site and would like to display a number indicating how many documents were added to a specific library since the users last visit. The UI will display a box ...
0
votes
0answers
96 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
52 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
229 views

Sharepoint unit testing using fakes framework

I have an application which uploads a file to SharePoint via client object model. Now I need to write unit test cases for this application. The problem is, I how do I write test cases for the ...
1
vote
1answer
648 views

SharepointOnlineCredentials not working in an app

I want to authenticate against sharepoint online site using SharepointOnlineCredentials class. Below code works fine in a console application. But the same code is generating error when written in wcf ...
3
votes
2answers
529 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
422 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 ...
0
votes
1answer
156 views

Equivalent of GetRolesAndPermissionsForCurrentUser in SharePoint REST API?

I have this code which is used to check if a user has permissions to access the site or not. jQuery.support.cors = true; $().SPServices({ webURL: sites[index], ...
3
votes
3answers
3k views

Retrieve list item using CSOM on SharePoint online isn't working

I've been stuck on this problem for couple days, I develop app model on SharePoint online using provider hosted model. From clientwebpart, i want to access sharepoint list item. I can access list ...
0
votes
2answers
1k views

Grant Permissions to List Items using existing SharePoint Group using Client Object Model

I have found examples on how to add users to SharePoint Groups using Client Object Model. Can anyone help provide an example on how to grant permissions to items in a List using an existing ...
1
vote
1answer
194 views

Get list at site collection level using SP.js

I have this code which is meant to get data from a list at the site collection level. var clientContext = new SP.ClientContext.get_current(); var oList = ...
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 = ...
2
votes
3answers
144 views

Need a way to identify files which have no checked in version

I wrote a script that traverses a collection, it's document libraries and gets a list of all files. I'm trying to find all the documents which do not have a checked in version and require a user to go ...
0
votes
1answer
293 views

How to change 'Modified By' column value when a new file is uploaded in SharePoint 2013 using Client Object Model?

I want to change 'Modified By' column value of a file that is being uploaded using Client Object Model in SharePoint 2013. The problem is that the version of the file is changing. Kindly help me. The ...
0
votes
1answer
177 views

Synchronize excel file with SharePoint online list

I want to synchronize data from excel file with SharePoint list on office 365. I have already built a utility which uses client object model to achieve this but it is very slow as item count are in ...
1
vote
2answers
346 views

running SharePoint utility on non-SharePoint server

I wrote a utility in C# to copy files from a network directory to a SharePoint document library. When the sys admin tries to run the .exe from a non-SharePoint server, he gets the following error: ...
1
vote
1answer
85 views

Surfacing an SharePoint Online Access Services query for use externally

Is there any way to write a query in Access Services for SharePoint Online, and surface its results through either web services or the Client Object Model for .NET? Like the way that the tables are ...
0
votes
1answer
90 views

CSOM and master page and page layouts: .html vs .aspx vs .master

When applying master pages and page layouts using CSOM, should we generally operate using .html files? What would be pros and cons of using .html vs .aspx and .master files?
2
votes
0answers
95 views

How to access Page layouts and site templates using CSOM?

How to access Site Settings > Look and Feel > Page layouts and site templates using CSOM? The page allows end users to change these settings: Subsite Templates: subsites can use any site template ...
3
votes
2answers
1k views

How to enable publishing feature using CSOM?

How to enable site collection publishing infrastructure and site publishing features using CSOM?
1
vote
1answer
72 views

Get Workflow ModificationID via JavaScript Client OM

I create a dynamic link to the workflow Midification form in SharePoint 2010. I can get all of required parameters such as ItemID, ListId and Workflow InstanceId via Javascript OM. The only problem ...
5
votes
1answer
142 views

SharePoint Client Object Model not returning hidden folders in document library

I am using the SharePoint Client Object Model to get information from a SharePoint 2010 document library to be able to delete old htm-files located there. The problem is that these htm-files have ...
0
votes
1answer
166 views

Jquery show loading progress [closed]

Good day, I have a page with several javascript pages that get loaded. How can I check that all the JS files have been loaded? I tried the below with just alert boxes. $(onPageLoad); function ...
0
votes
1answer
1k views

Add item in SharePoint 2010 document library using JavaScript [duplicate]

Is it possible to add a new item in a SharePoint 2010 document library using JavaScript (client object model)? I have successfully created list items in other type of lists, but when it comes to ...
0
votes
1answer
2k views

upload to document library subfolder in client object model

I'm using the Client Object Model to upload files from a network drive to a SharePoint document library. Here is how I would specify the upload location if I were uploading to the document library's ...
1
vote
1answer
93 views

I am not able checkin/checkout the files in sub folders in the document library using client object model. Below is the code I am using

public void CheckOut()// CHECK OUT FUNCTION { try { string siteurl = ""; string filePath = ""; ClientContext context = new ClientContext(siteurl); context.Credentials = ...
0
votes
1answer
207 views

Check-In & Checked Out files inside folder in Document library using Client Object Model

I am not able checkin/checkout the files in sub folders in the document library using client object model. Below is the code I am using. public void CheckOut()// CHECK OUT FUNCTION { try { ...
3
votes
1answer
307 views

Check- in & check-out files using client object model

As the title says, how can I Check- in & check-out files using client object model?
1
vote
1answer
551 views

Move documents from one folder to another in diferent library in different site collection from Client Object Model

I want find and move all documents from one folder to other in different site collection document library. Both the folders are at the sub folder level 3 from the actual list. Please let me know how ...