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

learn more… | top users | synonyms

1
vote
1answer
11k views

The property or field has not been initialized. It has not been requested or the request has not been executed

I am getting this error and from what I understand this is when you try and access columns from the list item. I have tried various things including the line below: clientContext.Load(items, eachItem ...
0
votes
1answer
5k views

How to read URL/Description from a Hyperlink field using CSOM

Using CSOM (JavaScript) how do you get the URL and description fields from a Hyperlink field?
0
votes
1answer
254 views

problem with loading client object model

I am using JavaScript Client object model to get rootWeb and check permissions of current user. So I have used ExecuteOrDelayUntilScriptLoaded in my MasterPage to wait for sp.js. The problem is when I ...
0
votes
2answers
1k views

Batch update with javascript client object model?

Anybody know how to do batch list updates with the javascript client object model in Sharepoint 2010? I'm putting the list into an array right now and then a kendo grid is reading it. I can update ...
1
vote
1answer
2k views

Access Object By a Single URL with the Client Object Model

Does the SharePoint Client Object Model have any method to access an object (List, Document, etc.) with just a single URL and valid credentials? Essentially, I want to access an object ...
1
vote
2answers
453 views

Which one is strongly typed the SharePoint Client Object Model or REST

I was researching about the SharePoint Client Object Model and REST but I am confused which one is strongly typed.
2
votes
1answer
2k views

Delete item from Client Object Model

I'm trying to delete an Item from a list using the following code: using System; using Microsoft.SharePoint.Client; using SP = Microsoft.SharePoint.Client; namespace ...
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 ...
12
votes
3answers
18k views

How to get all items in a View using Client Object Model (JavaScript)

To get all the items in a List you use // Setup context & load web context = new SP.ClientContext.get_current(); web = context.get_web(); context.load(web); // Load task list this.List = ...
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 ...
0
votes
2answers
5k views

How Can I Add a New File to a Document Library With Client Object Model?

I'm a beginner with SP COM. I can't find any samples about this online. Could anybody tell me how I should proceed to add or remove a file from a document library in SP 2010 with the Client Object ...
3
votes
1answer
2k views

Client Object Model - Update Document Library Metadata - Lookup Field with no required value

I am attempting to update metadata for documents in a document library (or List) using the client object model. I have whittled down a number of the error messages I was getting and now I am hitting ...
1
vote
2answers
752 views

Get id's of tags that are in a web part in Javascript

Ok, I have a page that that has a DataFormWebPart that basically displays the info from a document library. Now what I want to do is, using jquery, display or hide a section in the web part. I can do ...
5
votes
2answers
3k views

SharePoint 2010 .NET Client Object Model - add item to Web property bag

I'm trying to add a new item to the Web property bag using the SharePoint managed client object model, but it fails to persist. I'm using the following code: using (var context = new ...
6
votes
4answers
8k views

SharePoint 2010 Javascript Client Object Model cross site collections?

I've read some unofficial things online that using the Javascript client object model to retrieve content from other site collections is not allowed due to prevent the equivalent of "cross site ...
0
votes
1answer
619 views

Using client object model to trigger Content Organizer Rule

Using the client object model of sharepoint (Microsoft.SharePoint.Client) i'm trying building a client that will upload documents into the "Drop Off Library" within a record center site. I can upload ...
4
votes
4answers
7k views

Multiple Values in CAML query from Array? SharePoint 2010 using jQuery/SPServices

So if I use SPServices to GetListItems with CAMLQuery, is it possible to insert multiple values inside Value Type='Number'> here I would like to evaluate things throught a flow in my page, add to an ...
1
vote
1answer
523 views

How to get a full name from a User Lookup Field using ECMA CSOM

How do you get a user's full name using the ECMAScript (JavaScript) CSOM?
0
votes
0answers
513 views

How to send Email using Client Object Model ECMA Script/Javascript?

I want to send Email using Client Object model JavaScript.. I found Somewhere that it is not possible using Javascript but as I am using NAPA Tool for development in SharePoint 2013 this is the only ...
0
votes
2answers
663 views

Route a document to a Record Center using Client Object Model

I need to programatically upload a document and route to the record center with all content organizer rules. This should be a Client Object Model Solution. I have a solution in Server Object Model. ...
1
vote
3answers
1k views

401 with ClientContext

I am connecting to SharePoint via managed client api. ClientContext connects to the site and access the list data when I specify the site address as http://computer_name but when I give the configured ...
0
votes
1answer
312 views

Modal Dialog unexpected redirect

I follow these steps: 1) Open file permissions page in modal dialog clicking "Document Permissions" button on the Ribbon menu. The next page is opened: 2) Then I click "Modify" -> "Edit User ...
3
votes
1answer
2k views

Can I Access the SPAuditQuery from the JavaScript Class Library?

Or there's a SP2010 Built-in service to access Audit data? [UPDATE] Quick awnser, No, there's no way to access the SPAuditQuery from the SP JavaScript Class Library. At the end I end up using a WCF ...
1
vote
2answers
166 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 ...
1
vote
2answers
3k views

Read data from excel sheet using SharePoint2010 Excel Services

I am working with SharePoint 2010. I am created client object model application to access data from Excel Sheet which is uploaded on SharePoint Server. How can i do this ?
1
vote
1answer
2k views

Get web part Id with javascript client OM

Do you know how to get the current web part Id with the javascript client OM API ? Or an idea for a work-around ? Thanks
0
votes
3answers
222 views

Display external data in SharePoint-style lists style using the Javascript Object Model

I have a webservice which provides me with tabular data, which I would like to display in SharePoint in the typical SharePoint-List way. Now I could simple copy the html and styles and build the ...
2
votes
1answer
1k views

ClientRuntimeContext to ClientContext

I was wondering if their is any way to convert ClientRuntimeContext into ClientContext. i am retrieving the ClientRuntime context like this public File uploadBase(Document document, Folder ...
-1
votes
1answer
287 views

Specifying the ID of a new item

I basically want to write a server-side or client object model utility (Client object model preferred, but we can run the app on the server if we have to in order to use server side object model) that ...
1
vote
1answer
1k views

Get listitems with custom columns and edit them through c# client object model

I am trying to get a collection of .pdf files from a certain document library, as well as their fields and values. I need three of them - DisplayName, "Barcode"(custom) and "Document Type"(also ...
0
votes
1answer
1k views

Get all document libraries from a site URL

I'm trying to build a WPF application in which the user specifies the URL in a textbox and after clicking "Connect" the app will fill a Combobox with a list of SharePoint Document Libraries. I'm ...
0
votes
1answer
2k views

Getting the username from javascript client object model?

How do I go about getting the client username with the javascript client object model? I can't find anything helpful in microsoft's documentation, it's awful :|
0
votes
1answer
721 views

How to call C# (in a .WSP web part) from Javascript (in a Content Editor web part)

I have Javascript (Client Object Model) running in a Content Editor web part that controls other web parts on the page. The JS COM is limited in what it can do, so I want to be able to call managed ...
1
vote
2answers
4k views

Try Get Field with client object model without error

Question regarding the client object model. I wrote some client script for a procedure, but i don't know, how can I determine if the list or item has the field available or not? For example: ...
1
vote
1answer
474 views

How can i get entire role assignments from SP 2010 using the COM interface including the users in the AD groups and not the groups names?

I've been trying to get all the RoleAssignments using the COM interface. the problem is that i get the AD user group names instead of the actual users inside the groups. my code looks something like ...
2
votes
1answer
117 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 ...
0
votes
2answers
539 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
4k 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 ...
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 ...
1
vote
2answers
456 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
803 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
586 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
546 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
4k 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: ...