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

learn more… | top users | synonyms

2
votes
1answer
6k views

SPServices: trying to learn how to use this and jquery, help with example

So I am trying to learn these both as I read nuthin but great things all over the place about them. So this is what I have from example on codeplex: <script type="text/javascript" ...
1
vote
2answers
388 views

Exists / Count in client object model

What's a good way to perform an Exists or Count on the client object model classes? I have list with views. I want to check if a view already exists before creating it. Tried a couple of things, but ...
2
votes
1answer
1k views

What is the difference in GetCurrentCtx() and SP.ClientContext.get_current()?

Is there some reference to this subject? Both methods return completely different objects.
0
votes
2answers
183 views

Accessing template properties for a collection of sub webs using the ECMA Client OM

I am doing a Sharepoint project where I am displaying all subsites in a list on the home screen. I have set them up in a Microsoft Metro/Tiles design, so that each subsite represent one tile. I am ...
1
vote
1answer
234 views

Work around for calendar LVWP recurrence?

Is there any type of work around for recurrence issue for calendars? Everything I seem to find online about the topic leads me to believe that there isn't but its worth asking the experts! :) I am ...
0
votes
1answer
155 views

Can I query a DVWP with javascript?

Is it possible to query results in a data view web part with javascript? If so, how do you reference the DVWP in the syntax?
0
votes
2answers
1k views

Javascript How can I return a value for document.write in CEWP with javascript

I am new to this, and I am just trying to understand how to use some of the javascript I have learned in different ways. This may be a question of context, but an examples or explanation is always ...
1
vote
2answers
309 views

Given a URL, can I find if the site exists using the client object model?

I am looking for a "cheap" option to find out if a site exists, given a URL. I have no control over the server environment, so I am not able to add web services or code to it. Is there a way to find ...
2
votes
2answers
1k views

JavaScript with CEWP using ClientContext, do I need to add src to tag?

I am new to SP Dev and I am trying to add some CEWPs that reference javascript I have placed in text files and uploaded to a document library. For bland functions it seems to work fine, however for ...
2
votes
4answers
7k 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 ...
1
vote
1answer
485 views

How to get server datetime without postback using JSOM or services

My application page may be long time without reloading, and user changed system date and time. And I need to know datetime from server, not from client.
1
vote
0answers
426 views

List Item file attachment using ECMAScript Object Model

How to simply upload & attach file to listItem using Javascript? And how to get/download attachments.
1
vote
0answers
81 views

Is it possible to use https with Client Object Model in Silverlight

I found here this QA: Connect client object model to https url which mentions this article how to do it in full .NET client object model. That would be great if the class ServicePointManager (MSDN) ...
3
votes
1answer
554 views

Client Object Model - change the 'Editor' of a directory (SPS2010)

I'm trying to rename a folder in a Sharepoint document store through a web application. Changing the folder name works fine, but the name of the editor became the service user running the web ...
0
votes
2answers
546 views

client object model and jquery not loading — sort of

I'm getting some data from a list via the client object model. After I get the list data, and the page loads, I want to use a little jquery to add a hover effect. Easy enough, right? Well ...
11
votes
3answers
5k views

Grab a specific property bag using ECMA script

I am trying to grab a key/value pair from a specific property bag but can't find any documentation or example code on how to grab a property bag. Currently I can only seem to grab allProperties. Here ...
1
vote
2answers
165 views

Implementing a better user experience for interacting with a document library

We are about to start a project to implement an enterprise collaboration platform on top of SharePoint 2010 It's basically the notion of workspaces where users can exchange files. However, given the ...
0
votes
1answer
222 views

How do I fill a webpart with list values I have retrieved with ECMAJS SP2010

New to SP dev, but recently learned how to retrieve data from lists using ECMA with CAML. Added a CEWP, wrote the script to retrieve the data and it is working fine, multiple field filters, etc. ...
7
votes
4answers
2k views

How to access a Web application/Farm level property bag via jQuery/Javascript/ClientContext

It it possible to access the Web application/Farm level property bag using jQuery/Javscript/ClientContext? If not, then what are the possible alternatives to access Web Application Farm level property ...
0
votes
3answers
4k views

Get Sharepoint data synchronously with JavaScript

I was wondering is there some way to get list items form SharePoint with JS synchronously. All methods I've found required to specify a callback method. As I am building a custom JS validation for ...
1
vote
2answers
1k views

Is it possible to change the visual style of a JSGrid row?

I am working on a SharePoint solution using the SharePoint JS Grid control to display data. What I'd like to do is to change the default style (mainly background color) of specific rows in the grid to ...
0
votes
2answers
1k views

How to Client Side connect to Sharepoint 2010 with claim based auth

I had to create an application which connects to Sharepoint. The interested Sharepoint Application is set to work ONLY with claim based Authentication, so I cannot use the classic: NetworkCredential ...
2
votes
1answer
2k views

Javascript call to NewItem2 error “TypeError: Cannot read property 'tagName' of undefined”

Overview I have a CustomAction for a button on the ribbon that calls a command in a javascript file. The command fails in the inplview.debug.js file on the following lines (1745 - 1748) in the ...
2
votes
2answers
724 views

Does Managed Client object model work for Cross Domain?

I want to know whether managed client object model works in cross domain cases. For example I have a console application in Domain A, can I use managed client object model in the console application ...
0
votes
1answer
190 views

Change order of user profile property

Hi i want to change the order of user profile property in a subtype i found out this link SharePoint 2010 - Change order of User Profile properties which is changing only in default sub type but its ...
1
vote
2answers
980 views

Add value to Choice field through ClientContext API

I'd like to add and select values to a choice field in a document library. Something obviously more tricky than I remembered. I'm doing something like this but it doesn't work. The value gets added ...
2
votes
2answers
3k views

HTML from Rich Text Field as Plain Text

First off I want to be clear I am using the Silverlight Client Side Object Model in solution. So I cannot use objects/properties from the server object model. What I am trying to do is get the plain ...
0
votes
2answers
4k views

How to correctly get a JavaScript SP.Web object's ID and URL before loading

I was working on a project where I needed to get the current web's ID or URL (sometype of unique identifier) in javascript without making an service call (executeQueryAsync). I didn't seem to be able ...
3
votes
3answers
7k views

How to get Item from ListItem with Client Object model

I'm trying to printOut some items from a ListItem. But when run the code I get following exception: "Invalid usage of query execution. The query should be executed by using ExecuteQuery method on ...
3
votes
1answer
591 views

AddLookup using the client object model?

Trying (desperately) to find the Microsoft.Sharepoint.Client equivalent of SPList.Fields.Addlookup My code: ClientContext ctx = new ClientContext("http://sharepoint/"); Web website = ctx.Web; ...
0
votes
3answers
3k views

Upload limit and Exception when uploading files via Client Object Model

We have an windows application that uploads files to SharePoint 2010 via client object model. We have raised the upload limit as in the following article: ...
2
votes
4answers
2k views

where clause is ignored when query list

I have a CAML query which returns lists by a lookup field. here is the query <Query> <Where> <Eq> <FieldRef ...
0
votes
2answers
3k views

Uploading a Word Document to Sharepoint using SaveBinaryDirect() resulting in corrupted document

I am uploading a document to sharepoint site using client object model. using (FileStream fs = new FileStream(@"C:\temp\UlDoc.docx", FileMode.Open)) { File.SaveBinaryDirect(_cc, ...
0
votes
1answer
149 views

Disable windows auth, but access a resource in the site collection

I have a sitecol with anonymous access. I have a console code that uses client-object-model to query from a particular list in that site collection. This was working fine. But recently I had to ...
1
vote
2answers
1k views

Selecting single user from User Information List

I've got a problem with not being able to select a single list item from the User Information List, I have used U2U CAMLbuilder to build a query that extracts an entry with the ID = 1 When run in the ...
1
vote
2answers
419 views

Getting ECMAScript Client OM Intellisense to work in ASCX/JS

I can't for the life of me get intellisense working for the Client OM. It seems to work on another box I have tried so I'm wondering if I have found some kind of bug/configuration issue. I have tried ...
2
votes
1answer
387 views

Client Side vs Server Side Querying: When to use each?

Relatively new to developing for Sharepoint, but building a website with a lot of functionality. The frontpage alone is making 5 queries to separate lists and has numerous javascript libraries ...
1
vote
1answer
347 views

Working with client OM

I need to set currentUser to some item field in Client Object Model. How can I do it? I always use new SPFieldUserValue (//,//,//) in server code, but here..
2
votes
1answer
2k views

Incorrect Modified Dates on SharePoint Online for clients in other timezones

I've run into a strange problem with SharePoint Online. When updating or creating entries in a list using the Client Object Model, the modified date on the affected list item seems to be stored with ...
1
vote
0answers
521 views

Get Permissions with client object model

i want to add a permission on a folder who's inside a document library with javascript/jquery/client object model. The problem i have is, its a custom permission level created when some feature is ...
6
votes
1answer
2k views

JavaScript Client object model, rename folder

I am trying to rename a folder inside a Document library. Right now I get my item and everything is good but when I try to rename it using set_item('title', 'NewFolderName') it crashes and unwinds the ...
2
votes
1answer
610 views

set or update multiple values cascading lookup field using client object model

I'm struggling since a couple of weeks with setting a multiple values cascading lookup field using a client object model, I could set the first value but then It show me an error of invalid lookup ...
1
vote
2answers
1k views

CSOM Query on Hidden User Information List returning nothing

I'm trying to retrieve a user's profile picture from the hidden User Information List within Silverlight. I can't use the UserProfileService.asmx because I don't have the login name nor the GUID of ...
0
votes
1answer
2k views

SPDiagnosticsService.WriteTrace throws error “Object reference not set to an instance of an object”

I am trying to write entries into logging and have trouble doing so. Using Client object model on SharePoint foundation. Code is running from a console app. SPDiagnosticsService.Local.WriteTrace(0, ...
1
vote
1answer
2k views

HTTP 500, HTTP 401 errors when executing ExecuteQuery() on Client Object Model

I am using Client Object Model to access a document library on a VM SharePoint server where I do have 'FullControl' access to a Site & Site collection. The below code works on my SharePoint ...
0
votes
1answer
277 views

Missing eMail in SPUser

I have a small application that is making use of the SP-COM. I use the following code to get the current users email address: ctx = SP.ClientContext.get_current(); web = ctx.get_site().get_rootWeb(); ...
0
votes
1answer
194 views

Enumerate Summary links column values in JS COM

I defined a list where a Summary list is a coloum, in my javascript code i want to read the values of the links one by one... sliderText = listItem.get_item('Description0'); sliderTitle = ...
3
votes
2answers
5k views

Adding description to sharepoint link URL using the C# CSOM

I'm currently adding the URL except the description is an ugly link. I would like to add the description to the URL in a links list on sharepoint online. My current code to add a new item from an ...
0
votes
1answer
2k views

Getting list length from caml query

I am currently trying to determine the length of a list that is located on my SharePoint site. I am using a Caml query to retrieve the items in my list, but I can not figure out how to get the length ...
2
votes
1answer
394 views

Performance bottleneck on SharePoint upload method

Trying to eliminate a performance bottleneck on a method doing file and metadata uploads. According to the profiler on a line-by-line of the decompiled code, the majority of time is spent on ...