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

learn more… | top users | synonyms (1)

3
votes
2answers
3k views

Upload a document to a SharePoint list from CSOM with no limitations

I need to upload a document to a SharePoint list or folder using the Client Side Object Model from .NET (C#). What is the best way to do this? The requirements are as follows: Set metadata values ...
0
votes
2answers
571 views

how to get sub folder list and how verify the folder name exist or not using CSOM ,C#

i have to verify the subfolder names if not there in that list how to create dyanamically using CSOM and C#
0
votes
0answers
157 views

SharePoint 2013 BCS External Data Column

How do I return all entities without using entity.GetFilters() ? I have the following and I can only seem to produce a FilterCollection. I would much rather have just all the enities because i am ...
-1
votes
2answers
758 views

CSOM move the files one folder another folder

I have to all files from one folder another folder using CSOM and C# Thanks for your replay Huge Wood my code is below var targetSite = new Uri("https://hello.com//teams/Worldwide_Site"); ...
0
votes
1answer
123 views

How to copy the complete folder structure one location to another location include all files and sub folders

I have folder structure like in Shared documents/East using CSOM and C# Main Folder Folder1 Folder2 File1 File2 I have to copy all folders with files to Shared documents/West ....
1
vote
3answers
4k views

How to authenticate user in sharepoint online using javascript

I have one sharepoint online 365 site. In that one public site will be there. In that there is sign-in option. Generally When ever user clicks on signin it will redirect to microsoft login page. But i ...
0
votes
0answers
47 views

Best method of downloading a folder of content from multiple versions of SharePoint from .NET

I need to implement some code which, given a specific site URL and folder, will download all files within that folder and any sub-folders. I know I can use the SharePoint Client SDK for that, but one ...
3
votes
5answers
3k views

SP.ClientContext is always “undefined” in JSLink functions

I'm trying to execute CSOM functions as part of a JSLink extension to override rendering of a Lookup Field. Problem is every time I try to access SP.ClientContext it returns as undefined I have ...
3
votes
3answers
3k views

How to use “SPContext.Current.Web.Url” in client object model?

When working with server side code we can use the following line to obtain the url of the current web site: var url = SPContext.Current.Web.Url; How can we do the same when working with the client ...
1
vote
2answers
98 views

Why does my console output contain html tags for some field values?

I created a custom list which contains different field values e.g. Text Choice Note Currency Peoplepicker Using the following code I print the field values to console: List mealList = ...
0
votes
1answer
37 views

How do I integration test an SharePoint Online App?

It is my understanding that if I want to do integration testing of Apps for SPO I first and foremost need a tenant to do the testing on. The problem is, how do I run the tests? Ideally I want to use a ...
1
vote
0answers
40 views

How to convert TimeZoneInformation into TimeZoneInfo

I need get TimeZoneInfo object that represent timezone on SharePoint Server. In client object model I found object Web.RegionalSettings.TimeZone (Class TimeZoneInformation). How I can convert ...
1
vote
2answers
208 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, ...
2
votes
1answer
144 views

Get list of installed apps using Client Object Model

I have been trying hard to find any example, resource which explains how to get a list of installed apps in SharePoint 2013 environment using Client Object Model. So far I have found nothing. Could ...
2
votes
4answers
5k views

Client Object Model gives 401 when impersonating logged in user - MVC App

I have an ASP.NET MVC app that connects to SharePoint 2010 via the Client OM. When I run ExecuteQuery(), I get a HTTP 401 error from SharePoint. I have the MVC app set to impersonate the logged in ...
0
votes
1answer
55 views

Unable to trigger workflow

A sharepoint info path form calls this ASMX web service. The webservice inserts items into a sharepoint list like so... item["Area"] = Area; ...
4
votes
2answers
3k views

Remove “Add new item” functionality from lists

I have lists where the items are created from nintex workflows. I need to prevent the users from adding list items manually, as the workflows ensure dependencies. Revoking the add item permission is ...
0
votes
2answers
542 views

Get current language via Client Object Model

I need to get the current display language of a web via Client Object Model (C#) from a provider-hosted App. The app runs inside a Client Web Part (IFrame). I am aware of this solution but think it is ...
1
vote
3answers
128 views

Can I programatically move sites or content between 2007 and 2010?

Using the SharePoint Object Model on a SharePoint 2007 environment and the remote object model to talk to a SharePoint 2010 environment would it theoretically be possible to migrate sites or content ...
3
votes
1answer
68 views

Access Selected Items from List View

The following returns selected items correctly from standard list and document library types. var context = SP.ClientContext.get_current(); var items = ...
3
votes
1answer
50 views

Is it safe to use Reflection against SharePoint 2010/2013 Client object model to read Private variable in .net?

During some Read/Write/Update operations SharePoint Client Object model returns '(503) Service Unavailable' exception, reattempt solve this problem. Here, re-attempt Operation creates a new collection ...
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
0answers
81 views

Find termsetid by term name in Sharepoint 2010

i want to retrieve termsetid in console application using client object mode. because i want to create metadata site column using client object model but i need termsetid to create id. how to get this ...
0
votes
1answer
89 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. ...
8
votes
3answers
3k views

How to add list web part to the SharePoint page using Managed Client Object Model?

I am trying to add new web part to the SharePoint page using Managed Client Object Model that will display a list. I can't seem to be able to figure out the code of the web part's XML that is ...
1
vote
1answer
150 views

How to stop execution after exception in ExecuteQuery

I have a remote event receiver attached to a list on my SP web and code that then runs on the ItemUpdated event: var web = clientContext.Web; var site = clientContext.Site; var list = ...
3
votes
2answers
1k views

SP 2010 - Client object model (javascript) - How to use get_listItemCollectionPosition for paging?

This is my code: When I call the function to get the items, it fails (doesn't go to the fail function, it goes into the success function but crashes when I try to get the position object), and I get ...
0
votes
1answer
3k views

Setting file Content Type using Client Objects

Setting the Content type the same way as setting other metadata fields does not work in ClientObjects. Anybody knows why? Here is what I do, and works for other columns: var fci = new ...
6
votes
2answers
3k views

moveTo and moving documents from one library to another

I have followed and successfully implemented the excellent article: SharePoint 2010 ECMAscript – Copy\Move files to another document library – Part 2 located at: ...
1
vote
1answer
7k views

How to reterive list item values using CAML query?

I have one Date and time column and text colum. I need to retrieve list item value based on this both column using CAML query.. For ex: Columname---> Date value for date would be-6/1/2013 and ...
6
votes
2answers
6k views

Get list by Internal Name using ECMAScript / JavaScript Object Model

How can I load items from a list using its InternalName? As far as I know I can get it using either Id or Title like the following: var clientContext = new SP.ClientContext('/News/'); var web = ...
2
votes
3answers
167 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
0answers
81 views

using SharePoint COM to update list from csv file

Using SharePoint COM (using C#) I am trying to update my custom list from a CSV. In both the list and CSV file on column is common and I using that column for comparision. I am able to achieve the ...
1
vote
1answer
227 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
3answers
541 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 ...
0
votes
1answer
77 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
559 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 ...
2
votes
1answer
515 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
23 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 ...
0
votes
1answer
145 views

getting data from a list sharepoint object model CSOM javascript

I have a list which I want to get information from using javascript. It doesn't show the list just certain things like how many items in the list. I am completely new to sharepoint so don't have a ...
0
votes
2answers
83 views

Can we use “ExecuteOrDelayUntilScriptLoaded” with application pages.?

Can we use ExecuteOrDelayUntilScriptLoaded in application pages. If yes, do I need to add sp.js to the project to make it work?
0
votes
2answers
204 views

How to get value of custom lookup field.?

I have code here, clientContext.load(collListItem, 'Include(Id, Fruits)'); clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded), ...
2
votes
2answers
3k views

SharePoint client model and setting up lookup field

I have list A with "Title" column which is lookup column to List B. I need to update existing List B documents so that they will be linked to List A. However, SharePoint client context doesn't accept ...
2
votes
2answers
590 views

Sharepoint 2010 Client OM - How to get the Last approved document version?

I am trying to use sharepoint foundation 2010 as file store for a website. Every document update must go thru an approval cycle and finally gets to a approved status to show up on the website for end ...
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 = ...
4
votes
3answers
494 views

Is there a way to get Folder object from ListItem one?

This is my first post, so I'd like to say hello to everyone. I'm trying to get Folder object by its path in SharePoint 2010 client application using Client Side Object Model (.Net 4.0). I need to ...
0
votes
0answers
98 views

Get a document thumbnail URL using client object model on SharePoint Online

I am working in a SharePoint online based environment and I need to fetch the thumbnail url for a document in a library programmatically, using the .Net client object model (not EcmaScript). Is that ...
1
vote
1answer
536 views

Get all items with specific fields without query - SharePoint Client Object Model

Is it possible to get all items from a single list (getting specific fields) without using a CamlQuery? If I try to use context.Load(oList, ...), I can't use the Include method as the List class ...
1
vote
4answers
4k views

How to use javascript client object model in sharepoint designer?

I have to fetch data using javascript client object model and for that i have to use Sharepoint Designer 2010 only i have searched on google and there i got solution only by adding code in visual web ...