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

learn more… | top users | synonyms (1)

1
vote
2answers
302 views

Javascript Object Model; possible to return whether item has permissions under inheritence or not?

So if I am using the COM/JSOM, and normal GetListItem, can is there something I can add to the Include method, that will allow me to see if the item returned has permissions under default inheritance ...
5
votes
1answer
4k views

Check if user is in a specified group

I would like to check with JavaScript if the current logged user is in a specified and specific group (for example called "Admins Group"). How can I do? Thanks
1
vote
2answers
801 views

SaveBinaryDirect Throws Unauthorized When the Client Object Model Works fine

I have decided to use the SaveBinaryDirect Method to upload documents to the sharepoint site due to not having the request/file size limitations that the client object model has. The application does ...
2
votes
1answer
237 views

How to add Pragma No-Cache to Client Object Model Request

In developing an application that uses the SharePoint Client Object Model, we noticed that the application is not working correctly using Safari on our iPad devices. When testing on our desktops, we ...
1
vote
1answer
1k views

Lookup field value in CAML, Client Object Model

I am using the .NET Client Object Model from a website to access data in a SharePoint list. One of the fields I am trying to access is a lookup field. How do I get the text for the lookup field using ...
5
votes
4answers
712 views

js library for REST and JSOM SharePoint basic tasks

I am just sick of writing again and again the same piece of code to use jsom Async requests, especially when it's for a SP-hosted app which envokes spexecutor. I am sure each developer has his own ...
2
votes
1answer
2k views

How to find relative URL of a document library using CSOM

To upload a file using File.SaveBinaryDirect you have to know the server relative URL of the document library you're working with. Example from MSDN :- ClientContext clientContext = new ...
1
vote
0answers
16 views

Is it possible to query the status of a service application using the client object model?

My goal is to query the statuses of services and service applications from a remote machine. I don't want to actually interact with the services, all I need is the "Started"/"Stopped" status you get ...
5
votes
2answers
2k 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
53 views

How to validate if a SharePoint group already has permission on the site using Client Object Model?

I'd like to check if a certain group already has permission on the site using the client object model. I couldn't find any good example for that.
3
votes
2answers
3k views

Upload a document to a SharePoint list from CSOM with no limitations

I need to upload a document to a SharePoint list or folder using the Client Side Object Model from .NET (C#). What is the best way to do this? The requirements are as follows: Set metadata values ...
0
votes
2answers
703 views

how to get sub folder list and how verify the folder name exist or not using CSOM ,C#

i have to verify the subfolder names if not there in that list how to create dyanamically using CSOM and C#
0
votes
0answers
172 views

SharePoint 2013 BCS External Data Column

How do I return all entities without using entity.GetFilters() ? I have the following and I can only seem to produce a FilterCollection. I would much rather have just all the enities because i am ...
-1
votes
2answers
1k views

CSOM move the files one folder another folder

I have to all files from one folder another folder using CSOM and C# Thanks for your replay Huge Wood my code is below var targetSite = new Uri("https://hello.com//teams/Worldwide_Site"); ...
0
votes
1answer
152 views

How to copy the complete folder structure one location to another location include all files and sub folders

I have folder structure like in Shared documents/East using CSOM and C# Main Folder Folder1 Folder2 File1 File2 I have to copy all folders with files to Shared documents/West ....
1
vote
3answers
4k views

How to authenticate user in sharepoint online using javascript

I have one sharepoint online 365 site. In that one public site will be there. In that there is sign-in option. Generally When ever user clicks on signin it will redirect to microsoft login page. But i ...
0
votes
0answers
50 views

Best method of downloading a folder of content from multiple versions of SharePoint from .NET

I need to implement some code which, given a specific site URL and folder, will download all files within that folder and any sub-folders. I know I can use the SharePoint Client SDK for that, but one ...
3
votes
5answers
3k views

SP.ClientContext is always “undefined” in JSLink functions

I'm trying to execute CSOM functions as part of a JSLink extension to override rendering of a Lookup Field. Problem is every time I try to access SP.ClientContext it returns as undefined I have ...
3
votes
3answers
4k views

How to use “SPContext.Current.Web.Url” in client object model?

When working with server side code we can use the following line to obtain the url of the current web site: var url = SPContext.Current.Web.Url; How can we do the same when working with the client ...
1
vote
2answers
125 views

Why does my console output contain html tags for some field values?

I created a custom list which contains different field values e.g. Text Choice Note Currency Peoplepicker Using the following code I print the field values to console: List mealList = ...
0
votes
1answer
37 views

How do I integration test an SharePoint Online App?

It is my understanding that if I want to do integration testing of Apps for SPO I first and foremost need a tenant to do the testing on. The problem is, how do I run the tests? Ideally I want to use a ...
1
vote
0answers
42 views

How to convert TimeZoneInformation into TimeZoneInfo

I need get TimeZoneInfo object that represent timezone on SharePoint Server. In client object model I found object Web.RegionalSettings.TimeZone (Class TimeZoneInformation). How I can convert ...
1
vote
2answers
262 views

How to get title and url using allproperties

How can I get title and url using allproperties? I can get custom proeprty but do not know how to get title and url. I am not able to know as why I get the alert twice in the following code, ...
2
votes
1answer
156 views

Get list of installed apps using Client Object Model

I have been trying hard to find any example, resource which explains how to get a list of installed apps in SharePoint 2013 environment using Client Object Model. So far I have found nothing. Could ...
2
votes
4answers
5k views

Client Object Model gives 401 when impersonating logged in user - MVC App

I have an ASP.NET MVC app that connects to SharePoint 2010 via the Client OM. When I run ExecuteQuery(), I get a HTTP 401 error from SharePoint. I have the MVC app set to impersonate the logged in ...
0
votes
1answer
56 views

Unable to trigger workflow

A sharepoint info path form calls this ASMX web service. The webservice inserts items into a sharepoint list like so... item["Area"] = Area; ...
4
votes
2answers
3k views

Remove “Add new item” functionality from lists

I have lists where the items are created from nintex workflows. I need to prevent the users from adding list items manually, as the workflows ensure dependencies. Revoking the add item permission is ...
0
votes
2answers
591 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
3answers
137 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 ...
3
votes
1answer
71 views

Access Selected Items from List View

The following returns selected items correctly from standard list and document library types. var context = SP.ClientContext.get_current(); var items = ...
3
votes
1answer
53 views

Is it safe to use Reflection against SharePoint 2010/2013 Client object model to read Private variable in .net?

During some Read/Write/Update operations SharePoint Client Object model returns '(503) Service Unavailable' exception, reattempt solve this problem. Here, re-attempt Operation creates a new collection ...
1
vote
2answers
2k views

Unable to get property 'get_current' of undefined or null reference

$(document).ready(function () { var count = 0; retrieveCurrentListProperties(); function retrieveCurrentListProperties() { clientContext = new ...
0
votes
0answers
88 views

Find termsetid by term name in Sharepoint 2010

i want to retrieve termsetid in console application using client object mode. because i want to create metadata site column using client object model but i need termsetid to create id. how to get this ...
0
votes
1answer
101 views

JSOM CSOM query only get dates that are not passed todays date

I have a list which contains an end date, I want to query this list and only collect the items which end date have not passed todays date. Once this has happened I want to count the new queried table. ...
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 ...
1
vote
1answer
168 views

How to stop execution after exception in ExecuteQuery

I have a remote event receiver attached to a list on my SP web and code that then runs on the ItemUpdated event: var web = clientContext.Web; var site = clientContext.Site; var list = ...
3
votes
2answers
2k 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 ...
0
votes
1answer
3k 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 ...
6
votes
2answers
3k views

moveTo and moving documents from one library to another

I have followed and successfully implemented the excellent article: SharePoint 2010 ECMAscript – Copy\Move files to another document library – Part 2 located at: ...
1
vote
1answer
8k views

How to reterive list item values using CAML query?

I have one Date and time column and text colum. I need to retrieve list item value based on this both column using CAML query.. For ex: Columname---> Date value for date would be-6/1/2013 and ...
6
votes
2answers
6k views

Get list by Internal Name using ECMAScript / JavaScript Object Model

How can I load items from a list using its InternalName? As far as I know I can get it using either Id or Title like the following: var clientContext = new SP.ClientContext('/News/'); var web = ...
2
votes
3answers
183 views

Need a way to identify files which have no checked in version

I wrote a script that traverses a collection, it's document libraries and gets a list of all files. I'm trying to find all the documents which do not have a checked in version and require a user to go ...
0
votes
0answers
87 views

using SharePoint COM to update list from csv file

Using SharePoint COM (using C#) I am trying to update my custom list from a CSV. In both the list and CSV file on column is common and I using that column for comparision. I am able to achieve the ...
1
vote
1answer
260 views

How to access the data from Manage User Profiles?

We are have sync the SP with AD using Active Directory Import for SharePoint 2013. All the users have been picked up into the Manage User Profiles and new user properties have been added to the ...
0
votes
1answer
40 views

problem getting date time

I am using the CSOM in javascript. I have a list which contains 3 text types and 2 date types. When I use: var listEnumerator = this.listItems.getEnumerator(); var collection = ...
0
votes
3answers
714 views

What is best practice to add list item in SharePoint 2013 javascript object model?

I need reference code to add an item to a list programmaticaly via javascript object model in SharePoint 2013.. Got many solutions online but not sure what js to include, whether ajax calls are need ...
0
votes
1answer
89 views

CSOM query certain date

I have a list that has an end date in. Is there anyway to filter out the dates that are passed todays date? function retrieveCurrentListProperties() { clientContext = new ...
0
votes
3answers
718 views

count items in a list javascript CSOM [duplicate]

I am wanting to count the number of items in my list. Using CSOM in javascript I have tried it but my code doesn't work. Where am I going wrong. Here is my code: var clientContext = new ...
2
votes
1answer
618 views

Can we access list from other site collection sites using javascript object model?

ECMAScript object model can only be used in SharePoint sites. So you can’t use this object model in an asp.net site to access SharePoint resources deployed in another url as this is cross-site ...
0
votes
0answers
27 views

Linking a js file into a blank page in sharepoint then count how many items in a list

I have created a new page on my sharepoint site. I have embedded some html using the embed code <!DOCTYPE html> <html> <body> hello </body> </html> I have a js file ...