API for interacting with SharePoint from .NET, Silverlight, and JavaScript.
0
votes
2answers
396 views
Add multiple people using Javascript Client Object Model to a Field of Type SPFieldUserValue
I want to update a UserField client side.
I found the following code at this topic How to Use ECMA CSOM to Set a Field of Type SPFieldUserValue
Tried the following code:
var users = new Array();
...
3
votes
1answer
24 views
SharePoint 2013 lazy load for .click() issue
With IE 10 and Chrome 26 on Win7 x64 (Host1) no issues are appearing, except Firefox 20.
With IE IE 8 on Win7 x64 (Host2) and IE 10 on Windows Server 2012 x64 (Host3), there is the following issue I ...
0
votes
2answers
25 views
Can I programatically move sites or content between 2007 and 2010?
Using the SharePoint Object Model on a SharePoint 2007 environment and the remote object model to talk to a SharePoint 2010 environment would it theoretically be possible to migrate sites or content ...
2
votes
1answer
458 views
Check Out, Update, then Check In a File in SharePoint Client Object Model
I would like to programatically update a SharePoint file by checkout/checkin.
I have written code that looks like it should do what I want it to do:
static void ...
1
vote
1answer
395 views
Unable to get correct element on a sharepoint page using document.getelementbyid('<%textboxID.ClientID%>')
I have a sharepoint website which has multiple instances of the same visual webpart. On button click I am trying to get a textbox present in the usercontrol of the webpart using ...
0
votes
2answers
35 views
How to get display name from created by field in sharepoint client object model?
In my sharepoint javascript code, I am retrieving items from a list in my SP 2010 environment. I used a camel query to download specific fields. One of the fields was created by (person who created ...
1
vote
2answers
41 views
Item ID of current row
I am working on a script that needs to pull the SharePoint list item ID from the current row. I have a checkbox field in a multi-item form webpart that, when checked, needs to update the item without ...
1
vote
2answers
226 views
Error while pdating Master Page through JavaScript Client Object Model using SP 2013 App
I have created a Site Collection in SharePoint 2013 online.
In this site I am trying to update Master Page through JavaScript Client Object Model.
My JQuery scripts are able to change the Site Master ...
1
vote
0answers
13 views
How to create object of type SP.ListItemFormUpdateValue
How can i instantiate object of type SP.ListItemFormUpdateValue and initialize it to a List field so i can read the field values on client side?
If this is not posible, how can i read a value in a ...
2
votes
2answers
47 views
Prevent/override standard Modal Dialog close button(X) from closing
I want to validate custom modal dialog form and if its not ok, prevent form from closing.
For this purpose, I attached to X-close-dialog-button. Problem is to prevent it's default behavior.
function ...
1
vote
1answer
810 views
How to see if current user exists in people and groups field, using ecma/client-object-model
I have a list which has two fields. (Title,EditPermission). The EditPermission is "people and group" field. I can use the following code to compare the current user with the spuser in that field
...
0
votes
1answer
27 views
Getting user email from a List Item column using Javascript
I am creating a Hosted app using NAPA on Sharepoint 2013 (Office365). I need to retrive a user from a list column and get the user's email.
SP.List.getItems with a query returns a listEnumerator ...
1
vote
2answers
65 views
CAML Query works in my VS2010U, but not on anybody else's computer
I have a list with records uniquely identified by project numbers. This is column 5 - Col05 in my list. It works fine when I run the code, and I am getting the expected record. I can also read the ...
3
votes
2answers
254 views
Programmatically add item to sharepoint list from window application
How to add item to SharePoint list from window application using claim based authentication ?
it gives 401 forbidden error. user is authenticated from ADFS server.
1
vote
2answers
305 views
Getting the error “The underlying connection was closed: An unexpected error occurred on a receive.” using Client Object Model
I'm trying to connect to a SharePoint 2010 site using the .NET Client Object Model. When I run test code from a windows console app that I have written, I have no problems. When I try to run the same ...
1
vote
1answer
330 views
Create Publishing Page using Client Object Model (Jquery)
I am trying to create a publishing page (site page) using SharePoint 2010, Jquery, Client Object Model.
Any reference or help will be appreciated.
Let me know if any more details are required.
0
votes
2answers
994 views
Adding description to sharepoint link URL using the C# CSOM
I'm currently adding the URL except the description is an ugly link.
I would like to add the description to the URL in a links list on sharepoint online.
My current code to add a new item from an ...
1
vote
1answer
378 views
Sharepoint 2010 Client OM - How to get the Last approved document version?
I am trying to use sharepoint foundation 2010 as file store for a website. Every document update must go thru an approval cycle and finally gets to a approved status to show up on the website for end ...
1
vote
2answers
62 views
Connect to SharePoint Online using the Client Object Model from .NET 3.5
We have an on premise SharePoint 2010 farm, and a SharePoint Online 2013 farm. We would like to be able to have a solution running on the on premise farm that will talk to the online farm.
Since the ...
0
votes
0answers
21 views
how to update properties of item in doc set with client object model
I've been able to create doc sets and upload files to it with the client object model. I am having difficulty updating the properties of the files in the doc sets. Here is what I've tried:
public ...
0
votes
2answers
57 views
Control JavaScript with Ribbon Button
my aim is to add a Ribbon Button which is opening a printing dialog for a selected file in a document library. I already added the Button with SP Designer and linked it with a html file which is ...
1
vote
0answers
24 views
MOSS 2007: Multi-layer flyout menus on the global navigation
I've reset the MaximumDynamicDisplayLevels to 30. My goal is to create a global navigation menu that leads to other SharePoint sites/external links. Each tab on the navigation is the top category with ...
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
1answer
45 views
How to open file in adobe reader using command line without checkout from Javascript?
I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer ...
0
votes
1answer
28 views
Javascript IIFE and SharePoint Client Object Model
I'm having a problem with my javascript code that I am sure is to do with scope, but I can't figure out where I'm going wrong.
I'm trying to write a method that will allow me to retrieve items in a ...
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).
...
1
vote
1answer
427 views
set or update multiple values cascading lookup field using client object model
I'm struggling since a couple of weeks with setting a multiple values cascading lookup field using a client object model,
I could set the first value but then It show me an error of invalid lookup ...
0
votes
1answer
46 views
Programatically update profile field(s)
I have a requirement to update user profile fields. I'm able to query the fields, of course, using the CSOM API in Javascript.
But, as per here - ...
4
votes
1answer
567 views
How to add rich text content programmatically using Managed Client Object Model?
I am building a Silverlight application that interacts with SharePoint through Managed Client Object Model. One of the functionalities of the app is to update a list item field with rich text content. ...
0
votes
1answer
33 views
Date from list being displayed wrong on graph created programmatically
I have a list, where one column is of type datetime and another a numeric value.
The records are being entered correctly, in the form:
ID Col01 Col02
01 05/02/2013 6
02 05/03/2013 9
...
2
votes
1answer
473 views
Get TaxonomySession TermStore TermSet Term from Sharepoint 2010 Server using Microsoft.Sharepoint.Client.Taxonomy.dll
I'm coding a c++/c# client-application to communicate with a Sharepoint 2010 site which uses Taxonomy
I have downloaded and installed Microsoft.Sharepoint.Client.Taxonomy.dll from:
...
1
vote
2answers
34 views
Track users opening files from the farm?
Our internal auditors have made a request to produce a regular report that shows when users access certain files.
With this in mind I was wondering - is there a way in the object model or otherwise ...
0
votes
1answer
314 views
Querying for File properties plus ListItemAllFields properties
I'm trying to retrieve both a file's Id in its list, plus its ETag, using the following snippet;
using (var clientContext = new ClientContext(webUrl))
{
var results = clientContext.Web.Lists
...
0
votes
2answers
2k 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 ...
2
votes
1answer
42 views
Allow users to see other users in sharepoint groups with CSOM
How can I allow users to view the users in a sharepoint group? Currently if I try to query users in the site groups using the client object model I get an unauthorized exception.
For example, if I am ...
1
vote
1answer
37 views
Client Object Model - Select distinct
I am using ClientObjectModel (C#) to retreive data from a custom list, which is structured like this:
What i need is some kind of "select distinct" which retreives only the categories, without ...
0
votes
3answers
40 views
Multiple Webparts with same JavaScript on one Site (another Problem)
I rebuild the site (site before). I have on the site two or more Webparts. These CEWP are including the same JavaScript and this the JavaScript is displaying a table via:
...
0
votes
2answers
333 views
Problem with Calendar CAML Query
i have a problem with a CAML Query for a Sharepoint Online(Office365) Calendar. I try to get all Calendar Appointments between two dates. Here is my code:
private void getFreeDays()
{
...
0
votes
1answer
723 views
SPDiagnosticsService.WriteTrace throws error “Object reference not set to an instance of an object”
I am trying to write entries into logging and have trouble doing so. Using Client object model on SharePoint foundation. Code is running from a console app.
SPDiagnosticsService.Local.WriteTrace(0, ...
4
votes
1answer
1k views
How to get a list of all Choice field options using Client Object Model
How would you get a list of all the possible choices from a choice field (e.g. Task list Priority or Status fields) using javascript client object model?
1
vote
0answers
33 views
Will content type names change with locale? (Sharepoint 2010, client object model)
I'm making a content type/id hashmap. The relevant part of the code is something like this (js):
contentMap[content.get_name()] = content.get_id().toString();
I'm worried that the name will change ...
0
votes
2answers
69 views
Multiple Webparts with the same Javascript
I have a site with multiple Webparts. Some Webparts are linking on the same .html file.
The HTML file reads data from a list and displays it in a table by using javascript. My problem is that there ...
4
votes
2answers
131 views
how to set list alert using javascript in sharepoint 2010?
I need to set a list alert for current (logged in) user using javascript.
var currentcontext = new SP.ClientContext.get_current();
var currentweb = currentcontext.get_web();
...
0
votes
1answer
394 views
Create a folder structure in sharepoint via Client Object Model
Here's the class of my folder:
class MyFolder
{
private List<MyFolder> _folders;
public List<MyFolder> Folders
{
get
{
if (_folders == null)
...
3
votes
1answer
594 views
Permissions error in IE 8 but not Firefox 6.0.2?
I am using the Javascript Client Object model to access some information from a list. Below is the code I am using:
function getDeptInfo(id) {
//var value = ...
0
votes
1answer
392 views
How to access the TermSets of Metadata service using Client Object Model of SharePoint 2010 Programatically?
I want to know how i can find names of the metadata services available on the particular site, and if those services are available.
Also how can i access the TermSets of the metadata services using ...
1
vote
1answer
1k views
Missing fields from SiteUserInfoList user ListItems
I'm using the SharePoint 2010 Client Object Model to retrieve all the users from a SharePoint instance, via Web.SiteUserInfoList:
var query = new CamlQuery { ViewXml = "<Query/>" };
var ...
0
votes
1answer
64 views
Get current language via Client Object Model
I need to get the current display language of a web via Client Object Model (C#) from a provider-hosted App. The app runs inside a Client Web Part (IFrame). I am aware of this solution but think it is ...
1
vote
0answers
30 views
Retrieve property bag for sub sites using JSOM
I need to go through all sites belonging a site collection to validate a property bag of them. following is my code. the problem is the second call to get the property uses only one of the sites. I ...
3
votes
2answers
537 views
ExecuteOrDelayUntilScriptLoaded not executing after page publish
In SharePoint 2013 I have a page that is using the Script Editor web part.
In the script editor web part I have the following:
ExecuteOrDelayUntilScriptLoaded(startIt, "sp.js");
function startIt() {
...



