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

learn more… | top users | synonyms

3
votes
1answer
10k views

How to retrieve all items from a list (with custom fields) by javascript object model

I need to get all my custom fields from my list by Javascript Object Model.. The code I wrote down is this: var items; $(document).ready(function () { ...
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
2answers
353 views

Notify item update by JavaScript

I created a popup window that updated the metadata information of my item. When the operation of updating is complete I would like to close my popup and show the notify alert. I succeed to close the ...
-1
votes
1answer
298 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 ...
1
vote
1answer
557 views

Delete File History With Client Object Model (Sharepoint Foundation 2010)

I'm using the Client Object Model to interface my application to SharePoint 2010 Foundation. This application generates some versions of the same file... it's possible to see all the versions in the ...
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 ...
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 ...
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
769 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 ...
2
votes
0answers
154 views

SharePoint Online External Sharing Feature - Available through API?

I have a case where we would like to create a web part for use in SharePoint Online where users can request to share a site with an external vendor. We would like to automate the process of Sharing to ...
2
votes
3answers
1k views

Disable List Event Handler in the Client Object Model

I have a client windows application that is uploading many rows of data to a list. However, I don't want the event handler on the list to fire while rows are being added via the windows application. ...
1
vote
1answer
1k views

Submit selected items of ListView in Request (used in Webpart)

I develop a WebPart using VS2010 for a SharePoint page. My problem: I have to submit the selected items of the ListView to the WebPart code behind. The best solution would be to do it via the Request ...
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: ...
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 ...
3
votes
1answer
1k 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
557 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
2k views

Client Object Model : “Microsoft.SharePoint.Client.ServerException: The request uses too many resources”

When deleting 1000+ (link) items from a list in one batch using the COM, I encountered this exception : Microsoft.SharePoint.Client.ServerException: The request uses too many resources It seems ...
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 ...
3
votes
2answers
5k views

How to access the documents in using javascript in SharePoint 2013 Preview?

I try to get familiar with with the Javascript API of SharePoint 2013 (Preview). Therefore I started a SharePoint-hosted app using VS2012. The default app works just great after deploying to my local ...
1
vote
2answers
489 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 ...
3
votes
6answers
12k views

SP.UI.ModalDialog.RefreshPage from the dialog itself?

I have customized the display form on one of my list. On a webpart page, I have drop a view to this list. When I click on the title of my item, the custom disp form is shown as expected in a modal ...
2
votes
1answer
6k views

How to get only the document libraries from a sharePoint site using SharePoint Client Object Model?

Usually when we need to get all the document libraries from a SharePoint site, we can follow the given code snippet:- SPListCollection lstCol = ...
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
7k 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 ...
2
votes
2answers
902 views

Created a custom image uploader for the Rich Text Editor, but how do I insert the image?

Some background: I have created a custom image uploader for my rich text editor. I feel like I have taken the functionality most of the way, currently it can: Upload the image to another server ...
1
vote
3answers
811 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
626 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', ...
1
vote
1answer
1k views

Access ListItem.Properties from Javascript COM

Is there a possibility to access the ListItem.Properties from the Javascript COM? All I'm seeing is the possibility to read all Fields. There also is the funny [SP.ListItem.LoadExpandoFields()][1], ...
6
votes
2answers
4k views

Datetime update is one day off

I'm updating a list with a date field (just the date) using the ECMASCRIPT object model but when the date is inserted is one day off from the introduced date, It's literally making me pull my hair off ...
0
votes
1answer
568 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 ...
4
votes
2answers
4k views

Copy file using javascript client object model - new version

I have a solution that adds a custom button to the ribbon in SharePoint 2010 and am using the javascript client object model behind the scenes to copy a file from Library A to Library B when the ...
0
votes
2answers
689 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
3k views

jquery and javascript : can i get the last ID from document library?

Is there a way to get the last ID from a Document Library with javascript/jquery?
2
votes
2answers
11k 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); ...
2
votes
1answer
3k 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
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 ...
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
1answer
3k 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()? ...
0
votes
4answers
4k views

Object doesn't support property or method 'get_item'

When i try with this code i got error Object doesn't support property or method 'get_item' . Please help me to resolve function showTitles(urlColumnName) { var selectedItemIds = ...
0
votes
1answer
3k views

Getting selected items from a SharePoint:ListViewByQuery webpart, embedded in a Visual Webpart

I am having trouble getting the selected items from a ListViewByQuery webpart, using the Client Object Model (JavaScript). Code (server-side) <SharePoint:ListViewByQuery runat="server" ...
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 ...
2
votes
1answer
12k 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 ...
4
votes
2answers
602 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
1answer
483 views

List Onload event

What I want to do: I have a custom list that contains a lot of items. When an user loads the list, all items of his view should be checked. If there is a special value in the listitem a notifiaction ...
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 ...