3
votes
0answers
16 views

change NavigateForFormsPages value to true using CSOM

I'm searching for a way to change NavigateForFormsPages property using CSOM but no luck till now. Anyone has idea to do it using CSOM
1
vote
1answer
41 views

Lient Object & CAML -> Getting Items of a specific view

I need some support as I am struggeling to understand what is wrong with my code. I try to retrieve the data of a specific view. THe line "camlQuery.ViewXml = view.ViewQuery;" throws an exception "The ...
0
votes
1answer
69 views

Update only non read only fields of a SharePoint list using client object model

How to upadate only non read only fields of a SharePoint list using client object model? The code sample is working fine for a particular field like title string siteUrl = ...
2
votes
0answers
72 views

Get distinct values via mechanism used when clicking “Show Filter Choices” on a Sharepoint list using Javascript

As many other people on this site seem to need, I'd like to get an array (or equivalent) of the distinct values in a field for a list. The canonical way of doing this is to retrieve the entire field ...
1
vote
1answer
172 views

How to get root of variations by client OM (JS)?

Let say I have sub-sites on my "main site" (which is not root of site collection), like Home sub-site, About, Contact. The "main site" is actually language variation of another site. In another words ...
1
vote
1answer
127 views

SP2010 Javascript Object Model: programmactially add calculated column to list

I am building lists and adding fields via the following. I am wondering if I can add a calculated field and how you set the formula in this (or another method): function onCreateRootCause() { var ...
0
votes
1answer
87 views

SP2010 JSOM: when creating field using javascript, how to define date only instead of date & time

I create a list using: function createProjectList() { var clientContext = new SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); var listCreationInfo = new ...
3
votes
2answers
282 views

How do I programatically change the default value of, or remove from default view, title column using javascript?

Using the JSOM in SharePoint 2010, if I am creating lists programmatically using something like: this.myField= oList.get_fields().addFieldAsXml('<Field DisplayName=\'Key\' Type=\'Text\' />', ...
0
votes
1answer
169 views

Synchronize excel file with SharePoint online list

I want to synchronize data from excel file with SharePoint list on office 365. I have already built a utility which uses client object model to achieve this but it is very slow as item count are in ...
0
votes
1answer
86 views

Use REST or XSL to get a Table with totals

I have a list with items that contains several columns like: Year Month HourCategory1 HourCategory2 HourCategory3 Now I want to create a table that shows only totals of the hour categories: ...
0
votes
0answers
121 views

Trying to get all selected items from a list

Im trying to get all items selected in a list but unable to do so with the code below: getItem = new TextBox(); getItem.Text = "get item"; getItem.Attributes.Add("onkeyup", ...
2
votes
0answers
121 views

Change content type order via Javascript/ECMAscript

In my SharePoint-hosted app, I use javascript to apply a content type called "Order" to a list in my app. When users click "new item" to upload a document, I want that document to derive from my new ...
0
votes
0answers
216 views

How to add and delete items in SP list using multi select box?

My question is that I am using a multi select list box to insert selected data to sharepoint list and I am using ecmascript object model. <select id="dd" multiple="multiple"></select> ...
0
votes
1answer
80 views

Custom newfrom (upload a picture and fill in the picture url)

I have to customize an announcement list new and edit form. In the form is there is a Picture Colum. But I don’t want the user to go first to a picture library, upload the picture, copy the picture ...
0
votes
0answers
104 views

How to retrieve user Quicklinks from MySite with CSOM?

this is my first post on SharePoint StackExchange. Is there a way to retrieve current user Quicklinks and show it on the Startsite with CSOM? In this example, the link below "Edit Links" in the Left ...
1
vote
1answer
593 views

Javascript : How to handle version conflict errors when using javascript COM?

so I use quite a bit of the javascript client object model for CRUD operations to lists from custom pages (inputs) and I have found that I get version conflict errors on saves from time to time....its ...
0
votes
1answer
315 views

Javascript Object Model REST/AJAX: does callback/resulting function have access to the id of newly created item

so if I use rest like method to create a list item in javascript, can I get the id of the newly created item in the callback/result function? function createNewRecord(url, body, callback) { ...
0
votes
0answers
100 views

Copy list item and add it to the same list by copying their ID using ecma script

I need to Copy a list item which is selected and add it to the same list using ecma script..no workflow and designer is allowed(only client object model). I tried to copy the list items but i havent ...
0
votes
2answers
504 views

How do I delete potentially many items from more than one list using JavaScript?

I'm trying to use a script to remove multiple list items from multiple lists. I'm using Javascript because I don't have access to Visual Studio. The idea is there's a Parent List item in a ...
0
votes
1answer
22 views

COM ListItem not updating

ClientContext cl = new Microsoft.SharePoint.Client.ClientContext("http://" + "mysharepoint" + "/" + SubWeb); System.Net.NetworkCredential cred = new System.Net.NetworkCredential("myuser", "mypass", ...
3
votes
1answer
3k views

SP2010 Javascript REST API: updating list item using MERGE and POST

I am trying to use REST API approach in javascript to update a sharepoint list item where I have an id. So I use GET and POST to create records, but per MSDN article it looks like the way to do this ...
3
votes
2answers
1k views

SP 2010 - Client object model (javascript) - How to use get_listItemCollectionPosition for paging?

This is my code: When I call the function to get the items, it fails (doesn't go to the fail function, it goes into the success function but crashes when I try to get the position object), and I get ...
2
votes
2answers
511 views

Get list properties via JCOM

How do I get list properties like BaseTemplate, ItemCount, ListItemDeletedDate etc. via Javascript Client Object Model for SharePoint 2013?
4
votes
1answer
643 views

Error using javascript to retrieve a SharePoint list's items

I am trying to use this method to query items of a column of a list in my SP site via javascript (the reason I am doing this is to display that info on the page by modifying the html tags in the DOM), ...
2
votes
1answer
179 views

Filter Calendar view by Title in SharePoint 2010

i want to filter calendar view using title field. Is it possible to filter calendar view without make changes in modify view ?
1
vote
1answer
547 views

List item validation using .NET Client Object Model

On a SharePoint Foundation 2010 installation, I have a list defined and have set some simple validation rules on a couple of the fields: Text field (required) Number field (required, min: 50, max: ...
0
votes
1answer
556 views

Get the parent of a List Item

Given the following information; string webUrl, Guid listId, int itemIdInList I'm trying to retrieve the parent of this item, whether that is a List or another ListItem (i.e. a folder). Can anyone ...
2
votes
1answer
5k 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
602 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
2answers
3k 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: ...
0
votes
2answers
934 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 ...
0
votes
4answers
3k 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
7k 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
469 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 ...
1
vote
2answers
607 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
76 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 ...
1
vote
4answers
2k 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(); ...
6
votes
3answers
5k 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
0answers
228 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
2answers
3k 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
2k 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 ...
0
votes
2answers
443 views

client object model and jquery not loading — sort of

I'm getting some data from a list via the client object model. After I get the list data, and the page loads, I want to use a little jquery to add a hover effect. Easy enough, right? Well ...
3
votes
3answers
5k views

How to get Item from ListItem with Client Object model

I'm trying to printOut some items from a ListItem. But when run the code I get following exception: "Invalid usage of query execution. The query should be executed by using ExecuteQuery method on ...
1
vote
2answers
678 views

Selecting single user from User Information List

I've got a problem with not being able to select a single list item from the User Information List, I have used U2U CAMLbuilder to build a query that extracts an entry with the ID = 1 When run in the ...
0
votes
1answer
605 views

Caml query returning multiple lists

Trying to load a list from library containing two files. The following code when tested in CamlBuilder it is returning single row according to the filename selected. But in the program it is returning ...
2
votes
2answers
331 views

Clear list data from code

I need to clear the data contained in a list programmatically. I know I can iterate through every single item to delete it, but that takes forever. Any suggestion? (I'm with the client object ...
7
votes
1answer
504 views

JavaScript Client Object Model functionality to get all the non hidden lists of current web and listing them

We have requirement to get all the non hidden lists of current web using JavaScript Client Object Model(JSOM). I have tried the below code but failed to get the desired result. function ...
1
vote
1answer
228 views

Error while downloading Lists in a spweb

Here is the code private void downloadList(SPObjectData objectData) { using (SPWeb currentWeb = objectData.Web) { foreach (SPList list in currentWeb.Lists) ...
6
votes
2answers
2k views

How to create SharePoint list with custom template using Managed Client Object Model?

Creating lists in SharePoint using Managed Client Object Model is rather easy task. Here's how to create a list with SharePoint's custom list template: ListCreationInformation lci; List list; lci = ...
8
votes
3answers
3k views

How to add list web part to the SharePoint page using Managed Client Object Model?

I am trying to add new web part to the SharePoint page using Managed Client Object Model that will display a list. I can't seem to be able to figure out the code of the web part's XML that is ...