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

learn more… | top users | synonyms

2
votes
3answers
2k views

Client Object Model - How can I access a List using relativeServerUrl

I am using the client object model and I want to access a List using the server relative Url. Folders can be accessed using the web.GetFolderByServerRelativeUrl but no such function exists for lists. ...
0
votes
1answer
5k 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 ...
1
vote
1answer
237 views

Developing an intermediate Web-Service : using client object model or sharepoint model?

I need to develop a C# Web Service running on the SharePoint 2010 server which acts as an intermediate service between a Java system and this Sharepoint system. Which technology would this Web ...
1
vote
3answers
1k views

What is the difference between CamlQuery and SPQuery

Maybe a simple question, when to use CamlQuery and when to use SPQuery ? I think that SPQuery is used inside a WebPart running on the SharePoint server, and that CamlQuery is part of the Client ...
3
votes
2answers
837 views

When using Sharepoint Client Model I get error : The 'Contains' member cannot be used in the expression

When using 'Contains' in Linq query: var camlQuery = new CamlQuery(); var listItems = list.GetItems(camlQuery); var itemQuery = listItems.Where(i => ...
2
votes
2answers
6k views

Getting value of column in selected rows from list

I am trying to get selected rows in the list and select ids for the pdf generator. Debug stops after context.load(rows) and nothing happens after that till I reload the page. If remove code for ...
1
vote
2answers
864 views

comparing and modifying items in a list

Ok, so adding to my previous question here - I want to get certain columns from a sharepoint list, then compare values of those columns to items in my own c# list and, if they're different, modify ...
0
votes
1answer
82 views

compare values in list and change if necessary

So guys, I have a sharepoint list with and fields like "webID, url, rating" and a c# list with more or less the same fields. My task is to compare the lists by webID and if the row's "rating" field is ...
2
votes
1answer
618 views

How to print document library item from ribbon button

I'm creating some custom features to add functionality to the ribbon. I have created a button to print the page you are viewing very easily like that: SPItem containing elements.xml: <?xml ...
1
vote
2answers
962 views

Programatically refreshing a webpart

How can I use the client object model in javascript to have a function to refresh a list view? Scenario: I have a form that uses a button which uses the sharepoint client object model to insert a ...
6
votes
4answers
10k views

How to traverse SharePoint Library in Client Object Model?

I have SharePoint Library and i want to traverse all folder and sub folder of it using client object model. Can anybody have solution ?
1
vote
1answer
3k views

SP.js and Mootools?

I created a custom .aspx page in sharepoint designer that uses sp.js and I reference it like this: <SharePoint:ScriptLink ID="ScriptLink1" Name="SP.js" runat="server" OnDemand="false" ...
1
vote
1answer
193 views

How to Create multiple Document Uploader in Client Object Model?

I want to create multiple file upload application(Client Object Modal) which upload the multiple document in the specific(selected) document library with the meta data(custom properties in library). ...
0
votes
3answers
2k views

how to check CamlQuery results

.I am running below query against a sharepoint list. How to check the results of below Camlquery? cPop is set with value 'AboutUs'. Result is always zero records although list has valid matching ...
0
votes
4answers
3k views

How to verify in Javascript Object Model if a List Exists

How can I verify if the list I'm trying to retrieve in Javascript really exists? My code is: function Search() { var context = SP.ClientContext.get_current(); this.site = context.get_site(); ...
0
votes
2answers
273 views

Client Object Model Javascript intellisense

I created a new test.js file in the project node of my web part solution with VS 2010 and included the references: /// <reference path="C:\Program Files\Common Files\Microsoft Shared\Web Server ...
1
vote
1answer
594 views

ClientContext error while embedding a Silverlight control on ASP page

I build a visual web part in asp.net and I'm trying to embed a xap over it so that users who don't have Silverlight installed would see the asp content: <object id="SilverlightPlugin1" ...
2
votes
1answer
1k views

How to see if current user exists in people and groups field, using ecma/client-object-model

I have a list which has two fields. (Title,EditPermission). The EditPermission is "people and group" field. I can use the following code to compare the current user with the spuser in that field ...
1
vote
1answer
660 views

How to access the TermSets of Metadata service using Client Object Model of SharePoint 2010 Programatically?

I want to know how i can find names of the metadata services available on the particular site, and if those services are available. Also how can i access the TermSets of the metadata services using ...
0
votes
3answers
2k views

is it possible to get file properties

I'm trying to crawl over site documents and find their properties. While I was able to do the first part, using something like ClientContext clientContext = new ClientContext("http:xxx"); ...
3
votes
1answer
2k views

JavaScript OnLoad and SharePoint does not work

I have tried this <script type="text/javascript"> function myfunc() { ExecuteOrDelayUntilScriptLoaded(GetSuppliers, "Directory.js"); }; ...
0
votes
1answer
498 views

Simple jQuery to extend page body if Quick Launch has been toggled SP2010

Beginner. I have a link that expands a single page onclick with the following jQuery: <script type="text/javascript"> var $j = jQuery.noConflict(); function toggleQuickLaunch() { ...
1
vote
2answers
1k views

Is there a method to lock a SharePoint library as read only while client app is processing?

I'm currently writing C# code to automate doing a set of actions on a number of Excel files in a document library/folder tree. The actions include check out, running macros inside the Excel file, ...
9
votes
3answers
7k views

How to get the ID of the list item just inserted using ecmascript

I am stuck at a place where I have to update a list which has a Lookup column. For example I am using this code to update my normal list var clientContext = SP.ClientContext.get_current(); ...
3
votes
2answers
910 views

Client Object Model equivalent of SPWeb.SiteLogoUrl

I can get the name, url and description of a site using SP.Web but there is no logo property. Is there a javascript COM equivalent to ...
0
votes
1answer
326 views

CEWP with Calendar New Form : hidding selections, setting all day by default

So I came across a cool trick first in a book, then on a blog (here!), but it doesn't work for me. It's straightforward enough, couple lines of javascript/jquery, and a cewp in order to auto-select ...
1
vote
0answers
241 views

Validate list item with javascript API

I want to develop a custom datasheet view to edit a list. I add item through the javascript API. The problem is that the service doesn't control fields value. For example : - I add an item with a ...
1
vote
1answer
1k views

SP2010 Passing Value to New Item Form Modal using Client Object Model/SPD

Beginner. I have a list form that opens from page using SP.UI.ModalDialog. The form is to represent entries into a description list based on ID from parent list. The page has tabs that allow user to ...
2
votes
1answer
180 views

Server side equivalent of this Client Object Model code?

I have the following javascript: SP.ListOperation.Selection.getSelectedItems(); And I'm wondering if there is a Server Side Object Model equivalent to this that I could use in Page Load? The ...
9
votes
2answers
10k views

Pass parameters in ExecuteOrDelayuntilScriptLoaded in Javascript client Object model

I have written a javascript client-object model code and I am calling it through the below line code from content editor webpart: ExecuteOrDelayUntilScriptLoaded(getWebSiteData(sys), "sp.js");// ...
2
votes
2answers
6k views

SP2010 Using Modal Dialog for Forms : Beginner Questions

So I am trying to figure out how to use some java script in order to use a modal dialog to display new item form. The below is what I have thus far, but its not working and I am not sure what portion ...
1
vote
1answer
2k views

set multiselect lookup column using jquery

I have a Multi select Look up column which as you all know is a control with two list boxes and "Add or Remove" Buttons. The user populates the right-hand side of the control with some values by ...
0
votes
2answers
2k views

Multi select Lookup column returns null in javascript client object mode;

I am trying to retrieve the selected values of multi select lookup column and store them in array and then set the lookup column with the same selected values after drop down value changes but always ...
1
vote
2answers
484 views

How To Get Site Title From URL in other web app

I have a situation where I need to retrieve the site title for a site in another web application using client side scripting. Client site JQuery SOAP calls to the "Webs" web service returns the ...
6
votes
1answer
3k views

no sorting with JavaScript Client Object Model?

I have the following JSOM code: var query = "<View><Query><Where><Eq><FieldRef Name='Category'/><Value ...
1
vote
1answer
525 views

anchor tag in SharePoint master page

Hi can someone help me in putting up a anchor tag in SherePoint custom publishing master page. Actually I want to open a site page on click on this anchor tag, this site page will be in the top level ...
4
votes
2answers
11k views

SPService GetListItems with CAML : can't get example to work

enter code hereI am using an example I found on codeplex of SPServices with CamlQuery to try to get list item values with where clause on the ID. For whatever reason this doesn't seem to work for me; ...
1
vote
1answer
2k views

To check edit permission on a specific list using ecma script client object model

Users will have read permission at web level but in some scenario few users can have edit permission on just one list under the web (role is broken for the list and explicit permission is given on the ...
0
votes
2answers
5k views

How to get List Name from JS Object Model - List Name from URL problem

I'm trying to connect Ribbon to Pages.. This works, javascript get what I need and pass as parameter to my page.. I pass the URL and the SelectedItemsID.. I'm facing a problem: If I had a List ...
0
votes
2answers
4k views

Specify item fields to Load using Sharepoint 2010 Client OM

How can I dinamically generate/specify a list of item fields I want to load when querying a list using the Client OM? This is possible to do using the tag on the CAML query, but this loads additional ...
2
votes
1answer
7k views

jQuery & SP2010 : Upload document to library using jQuery?

I built a custom form that saves the data to multiple lists with on click; it works pretty well for its intended use (keeping the data related). Thing is I am totally new at jQuery and SPServices, but ...
1
vote
1answer
2k views

Get the content of a content webpart with the client object model

Is it possible to get the content of a content webpart by using the client object model of SharePoint? The usage scenario: I want to copy a site page (with content in content editor webparts) from ...
2
votes
1answer
602 views

How to get SpWebApplication level property bag using ClientContext?

is it possible to get SPWebApplication level property bag using JavaScript ClientContext? Code example will be appreciated. Fine Regards
0
votes
2answers
3k views

How to get SPSite aka SPWeb property bags using ClientContext? [duplicate]

Possible Duplicate: Grab a specific property bag using ECMA script I would appreciate if some paste a sample code to get the property bags values using ClientContext?
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
406 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 ...
3
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
185 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
242 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
156 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?