API for interacting with SharePoint from .NET, Silverlight, and JavaScript.
2
votes
2answers
885 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
87 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 ...
2
votes
4answers
4k 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
1k 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
110 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?...
0
votes
0answers
98 views
How to add LinkItem inside folder in sharepoint list of type Links
I have SharePoint 2010 in which i have a list whose type is "Links". Inside this "Links" list, i have a folder.
I want to add link item to this folder programatically.
I am using ...
2
votes
3answers
1k 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
378 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
2answers
265 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
579 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
211 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
219 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], ...
2
votes
2answers
619 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
267 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
0answers
166 views
How set Default-Values of Choice by the Creation of new Lists via (JavaScript) CSOM
Im trying to create a list by using the JavaScript CSOM, but Im stuck at a certain point.
In this example I use the Template "SP.ListTemplateType.issueTracking" to create and enhance a list,
in this ...
0
votes
0answers
918 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
261 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
826 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?
0
votes
2answers
3k 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
1k 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
541 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 ...
3
votes
2answers
1k 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
935 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
3answers
957 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
1k 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
84 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 ...
0
votes
0answers
105 views
Creating Content Organizer Rules using Client Object Model
I want to create Content Organizer rules using "Client Object Model"
Is it possible to create CO Rules using client object model??
Any pointers to this would be helpful.
also can't i treat the ...
0
votes
0answers
142 views
Uploading file “NewItem2”
I'm attempting to upload a file to SharePoint using the NewItem2 function. However, after uploading the file, I want to get the relative URL of the uploaded file. Is this possible? Is there a ...
0
votes
1answer
2k 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
218 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
254 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 ...
1
vote
2answers
947 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
1k 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 ...
0
votes
0answers
378 views
Retrieving Document Library item URL from ID
How can I retrieve the URL of an item/document in a (generic) document library when the only thing I have is the ID, obtained through:
SP.ListOperation.Selection.getSelectedItems();
My intention is ...
1
vote
1answer
206 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 ...
0
votes
3answers
390 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
184 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
2k 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
331 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
66 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
304 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
651 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 ...
0
votes
0answers
455 views
Programmatically add multiple users to various groups based on information in a list
Due to security restrictions, my organization has a very complex group structure granting fine-grained permissions. We are trying to build a portal that allows for an approval system for group ...
0
votes
0answers
126 views
sp.js problem with third party library
My sp.js load is conflicting with Mootools 1.4.1's mootools-core.js, the error output is:
Webpage error details
Message: Object doesn't support this property or method
Line: 2
Char: 1
Code: 0
URI: ...
8
votes
3answers
4k 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
2k 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
165 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
541 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 ...
1
vote
3answers
740 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
204 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 ...
