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

learn more… | top users | synonyms (1)

1
vote
1answer
65 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 ...
1
vote
3answers
166 views

how to use user profile with object model

how to use user profile with client object model.? I need to fetch some properties in object model. code example will be helpful.
1
vote
2answers
162 views

Calendar View not properly displaying in WebPart

I'm trying to have my events list display as a calendar view in a Sharepoint-hosted app written using JavaScript and the Client Side Object Model. Here's the code I'm using. From Default.aspx: ...
0
votes
1answer
67 views

Install app from SharePoint store via client object model

I'm looking for a way, how I can install app from SharePoint store to my site in Office 365 using Client Object Model. In Object model I found method Web.LoadAndInstallApp. It work if I put app from ...
0
votes
2answers
177 views

How to attach documents stored in document library to mails using Client Object model in Sharepoint?

I am trying to attach a file present in a doc library and send it using smtp in client object model. Its in office 365. It throws an exception "The given path's format is not supported". Is there any ...
0
votes
1answer
65 views

Get version history of all items in a list

I'm looking for a way to get a list of all the status changes of every item in a SP2007 document library. I want to build some reports that show the average length of time a document spent in a given ...
0
votes
1answer
39 views

How to link Title in object model

I am displaying all blog posts Titles on post page. But I want to link those post so that user should click on that. Below is my code. <label id="labelHTML"></label><script ...
1
vote
2answers
68 views

Update Existing Site Content type Column through code

I have a calculated site column. This Site column is used acrossed sites in Content types. Now when I use power shell script to change the Calculated foremule is allowing me to change only in Site ...
0
votes
2answers
197 views

Get Current list item

How to get current (opened) list item using object model. I have a blog which has list named posts. when user opens anyone post, i need to do operation taking that current opened list item. I am using ...
0
votes
1answer
137 views

Dynamically create metadata and associate it with File using Client Object Model

Is there any way to dynamically add metadata in the upload file. I am using the following code in this regard. File uploadFile = context.Web.GetFileByServerRelativeUrl(location); //check out to make ...
0
votes
3answers
80 views

Print / display list items on page

I am using SP2010. Using client object model in the CEWP (Content Editor Web Part), I can give alert for each item title. But I want to print all list items on the page. I tried with document.write() ...
2
votes
2answers
68 views

Which is the best possible way to connect to SharePoint Sites using Client Object Model

I came across a complex situation (imo) which is why I am asking this question. I am developing an application where in, I connect to all SharePoint Sites specified by user and all its sub sites using ...
2
votes
0answers
182 views

Changing the Modified Date of a List Item using the SharePoint Client Object Model (C#) with Contribute Permission

I have a small snippet of code that I use to update the Modified Date of a list item and it works great for users with Full Control permissions. However, for users with just Contribute access to the ...
0
votes
1answer
101 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 = ...
1
vote
0answers
42 views

Check highest priority permission to access folder or file

if any folder or file has more than one permission(e.g. read and full control) for any user or group to access it if i check that permission in code how to check highest priority if folder or file has ...
0
votes
1answer
55 views

SharePoint current user is wrong

If I logged in as a different user in SharePoint below code doesn't show current user logged in user, what is the problem? Web web = clientContext.Web; User user = clientContext.Web.CurrentUser; ...
1
vote
2answers
255 views

Moving documents from one server library to another server library programmatically

I am a beginner in Sharepoint and given a task to write timer jobs. Once triggered, I want to move documents from one Sharepoint server library to another server library programmatically. So far my ...
3
votes
1answer
217 views

Check if logged in user is member of AD group with ECMA script SharePoint 2013

There is active directory group added to SharePoint group. How would we can check that the logged in user is member of that active directory group using ECMA script?
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
4answers
645 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 ...
0
votes
1answer
51 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.
0
votes
2answers
596 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
157 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 ...
0
votes
1answer
129 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 ....
0
votes
0answers
47 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 ...
-1
votes
2answers
800 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"); ...
1
vote
2answers
102 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
41 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
215 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, ...
0
votes
1answer
55 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; ...
3
votes
1answer
113 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 ...
0
votes
2answers
376 views

Add item to list using button

I try to create button that will be add item to the list. Unfortunately I do somethings wrong. My programming skill's are at beginner level. I have list "List" with only one field Title (for test) - ...
3
votes
1answer
68 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
50 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 ...
0
votes
0answers
81 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 ...
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
1answer
91 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. ...
1
vote
1answer
152 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 = ...
0
votes
0answers
81 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
229 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
39 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
1answer
80 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
583 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 ...
0
votes
3answers
565 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 ...
2
votes
1answer
530 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
24 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 ...
0
votes
1answer
147 views

getting data from a list sharepoint object model CSOM javascript

I have a list which I want to get information from using javascript. It doesn't show the list just certain things like how many items in the list. I am completely new to sharepoint so don't have a ...
0
votes
2answers
211 views

How to get value of custom lookup field.?

I have code here, clientContext.load(collListItem, 'Include(Id, Fruits)'); clientContext.executeQueryAsync( Function.createDelegate(this, this.onQuerySucceeded), ...
0
votes
2answers
83 views

Can we use “ExecuteOrDelayUntilScriptLoaded” with application pages.?

Can we use ExecuteOrDelayUntilScriptLoaded in application pages. If yes, do I need to add sp.js to the project to make it work?