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

learn more… | top users | synonyms (3)

2
votes
1answer
115 views

Stopping users from using the “newitem” and “edititem” forms

I have a series of pages that use the javascript object model to interact with information stored in lists (this supports sort of an application behaviour but not quite, but I can't complain it's the ...
3
votes
0answers
922 views

Url to an item with Client Object Model

Regarding my question, at this moment i'm writing some client object model code and I can't find a way to retrieve create make an url ... My question now is: How can I create an url to an item? I ...
0
votes
2answers
518 views

Ribbon button and client object model code

My question is regarding the button on the ribbon and client object model code. I'm not sure how to do it: So i have a button here: <CustomAction Id="NewButton" Location="CommandUI.Ribbon" ...
1
vote
2answers
6k views

What arguments can I pass to NewForm.aspx using SP.UI.ModalDialog.showModalDialog(options)?

I'd like to create a task with a pre-filled title, as well as set some other properties. I found this documentation that says I can pass arguments when i call ...
1
vote
1answer
4k views

Update lookup field programmatically in sharepoint 2010 using COM

I created a Lookup list component using javascript and HTML to view the values of the lookup list in sharepoint 2010. and it works great for viewing. is it possible to update the lookup field ...
2
votes
1answer
3k views

ClientContext + camlQuery.ViewXml

I use SP Client and want to return ListItemCollection which will be filled with items from specific view which I choose. I get ViewQuery string by sending view index in viewcollection. Problem is in ...
4
votes
2answers
3k views

Managed Metadata and the client OM

Is it possible to return the values of a Managed Metadata field assigned to a document using strictly the client object model? Note that I want to return ALL the possible values and allow the user ...
0
votes
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 ...
1
vote
2answers
423 views

javascript method to delete content from recycle bin of a single site only

So I know you can use jvascript:emptyItems() in the address bar of the recycle bin to clear it, but this clears the entire site collection. Is there a way using javascript to empty the recycle bin ...
1
vote
1answer
115 views

SharePoint 2010 server object model required runwithElevatedPrevileage

I have a query that SharePoint 2010 server object model required runwithElevatedPrevileage. if suppose we not using that elevated access, what are all the restriction we will face?...
4
votes
3answers
6k views

PowerShell and the client object model: “The collection has not been initialized”

I'm trying to grant a user permission to a SharePoint site using PowerShell and the client object model. The code I'm using is as follows: # Setup context $context=New-Object ...
0
votes
1answer
1k views

What are the BCS/External List Limitations for ECMA CSOM?

I cannot seem to find any documentation on this topic. Are there any limitations for what I can or cannot do with the JavaScript CSOM in SharePoint Server Standard 2010 External Lists as compared to ...
1
vote
3answers
792 views

Is it possible to use Sharepoint Client Object Model for a Windows Application?

Is it possible to use Sharepoint Client Object Model for a Windows Application? If yes then how to do it? Thanks in advance...
0
votes
1answer
553 views

How to access a javascript variable from a parent page in a modal window?

I have a page with the following javascript on it: var myVal = 'something'; Pub.Ribbon.PubRibbonComponent.launchDialog('_layouts/RteUploadDialog_Advanced.aspx', ...
0
votes
1answer
526 views

GetListItem(strUrl) equivalent for ClientContext

I know using server side code I can use GetListItem(url) to get an item using a server relative/absolute url (such as this question) however I cant seem to find the same code using the Client Object ...
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
2answers
202 views

Client-side Object Model Load Test Metrics

I would like to know if anyone has done any load testing on using managed .NET Client Side Object Model (CSOM)? I am mainly looking for metrics (graphs, spreadsheets, etc.) on the following: Large ...
1
vote
3answers
3k views
1
vote
2answers
10k views

How to close a modal using javascript from code behind?

So far I have tried this: Page.ClientScript.RegisterStartupScript(this.GetType(), "closePage", "window.returnValue='http://sp-pubdev:88/Resources/Images/testFile.png'; alert(window.returnValue); ...
3
votes
4answers
2k views

Get SharePoint Server datetime

I was working on a functionality where we had to fetch list items from server using ECMA script (SharePoint 2010 Client Object Model) based on current datetime. The problem is that the datetime we ...
1
vote
2answers
1k views

Is <QueryOptions> valid in SP.CamlQuery for meeting work space

I'm trying to query all items in a meeting workspace list. I'm trying a query I think should work, but still only returns items specific to the instanceID. Is there a different flavor for client side ...
1
vote
1answer
2k views

JavaScript SP.CamlQuery() return DateTime fields with offset (in my case +11 hours)

JavaScript SP.CamlQuery() return DateTime fields with offset (in my case +11 hours). In standart Display/Edit forms and views display correct DateTime. How to get correct DateTime via SP.CamlQuery()? ...
2
votes
1answer
2k views

SharePoint Modal for Document Upload: changing the Dialog options for Edit Form

So I am using the Upload.aspx for doc lib with GUID in order to have Upload at a custom spot on a page. I think its the edit form that pops up right after you upload a document to add the metadata. ...
0
votes
2answers
268 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 ...
2
votes
1answer
6k 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
2answers
932 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 ...
1
vote
1answer
372 views

Help with Silverlight and SharePoint

As a continuation of my last question, I can get the data correctly now just I am having a problem getting it to display. I want it to be in a DataForm control but I seem to be unable to connect it ...
0
votes
1answer
89 views

Searching for a CEWP on a page using jquery

I have a requirement where in i have to set the link of the CEWP using jquery on a button click. The approach i was thinking of is : On button click , find the CEWP on the page. Change the link to the ...
4
votes
2answers
547 views

Can you call SPSite on a different machine to SharePoint setup?

I'm trying to call SharePoint from within a standard .NET class library. This will probably be hosted on a different server to SharePoint. I just need to return an item from a list, and wondered if I ...
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"); ...
0
votes
1answer
454 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
1answer
232 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 ...
2
votes
2answers
5k 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
1answer
339 views

Sharepoint managed client object model - Updating Eventdate in calender

I am using managed client object model in sharepoint and I am adding EventDate and on adding that I am catching exception which says Microsoft.SharePoint.SPFieldValueException if ...
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 ...
1
vote
2answers
792 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
80 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 ...
5
votes
3answers
11k views

Cannot get field value of list item through JavaScript

I try to get the value of a list item (that is currently selected). I know that I must load it into the context but even with loading the field explicitly I get the following message. Microsoft ...
0
votes
1answer
303 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
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" ...
0
votes
1answer
443 views

Sharepoint linq throws error

I know this is a common problem and there are lots of suggestions on the internet, but non of them helped me to sort this issue out. I have created my data context class by using SPMetal.exe tool. I ...
1
vote
1answer
547 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" ...
8
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(); ...
1
vote
1answer
983 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 ...
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"); }; ...
2
votes
2answers
2k views

SharePoint Client Object Model Assembly Distribution

I would like to know if it is illegal (against MS licensing agreement) to: Copy the Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime assemblies from a SPF 2010 server to TFS ...
1
vote
0answers
233 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 ...
0
votes
1answer
539 views

Logical AND ,OR CAML Query not working in External List

I am using ClientContext Class and CAML query to retrieve items from External List in sharepoint 2010.I have built the query with Logical AND Condition in CAML Query like this string sDataFilter ...
2
votes
1answer
177 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 ...
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 ...