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

learn more… | top users | synonyms (1)

1
vote
2answers
415 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 ...
0
votes
2answers
1k views

Get all subsites of top level site using JavaScript OM

I am trying to get all sub sites of the top level site. However, the code I wrote for the app returns zero subsites. I am a little mystified as to why: var context = SP.ClientContext.get_current(); ...
0
votes
2answers
38 views

Delete column from list using Client Object Model

Developing for SharePoint Online, I've created a Contact List programmatically in my app. I now want to delete some of the columns that were added to the list. So I have the following code: var ...
1
vote
0answers
84 views

CSOM caml query list view lookup threshold

I have a list with about 15 managed metadata columns in it. Now I want to query that list using CSOM. I don't want to retrieve all the columns values so I limited the column values retrieved by using ...
0
votes
2answers
61 views

Load more list items on scroll

I am showing the first 5 list items on the page (in one div). Div has vertical scroll bar. I want to show the remaining 5 items on when scroll goes down end. I am using CSOM to fetch list items. Any ...
0
votes
1answer
107 views

CSOM Javascript - when executing query on multiple lists getting error - SharePoint 2010

Is here any SharePoint expert, who can help me find out, why I am getting error on lists queries? I am trying to fetch data from multiple list asynchronously, but I am getting following error: The ...
7
votes
5answers
5k views

Creating Nested Folders via Client Object Model

I'm trying to create nested folders in my document library so it looks like this: http://site/PublicDocuments/Folder1/Folder2/Folder3/ The document library "Public Documents" exists but none of the ...
0
votes
1answer
44 views

Create Custom Content Type using Client Object Model

I need to create custom content type from a given guid for a SharePoint site using Client Object Model. However, in the constructor of ContentTypeId ctid = new ContentTypeId() there is no facility ...
0
votes
2answers
106 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
46 views

Unable to add .exe file to SharePoint 2010 using Client Object model after it has been removed from blocked files list

Language: C# Framework: .Net 4.5.1 Environment: SharePoint 2010 - Windows Server 2008 R2 My software is used to upload files to sharepoint. It works perfectly well for the majority of files. However, ...
3
votes
2answers
7k views

SPService GetListItems with CAML : can't get example to work

enter code hereI am using an example I found on codeplex of SPServices with CamlQuery to try to get list item values with where clause on the ID. For whatever reason this doesn't seem to work for me; ...
1
vote
2answers
162 views

JS CSOM to redirect to another SharePoint URL

I have an application page which takes some inputs for list creation. Based on these inputs, i am using JavaScript Client Object model to create a new list. Once the list is created a notification ...
0
votes
2answers
72 views

Javascript Client Object Model Update List Items (only some items updating)

I am using a JavaScript button to set a Field-2 on each selected list item from "false" to "true". It first checks if Field-1 is empty, and if it is, sets Field-2 to true. The relevant code is as ...
0
votes
2answers
58 views

Get SP.ListTemplateType enum value using JSOM

I am trying to create a new list (based on a dropdown menu selection) using JavaScript Client Side Object Model. var typeList = "SP.ListTemplateType." +listTemplateType; ...
2
votes
1answer
530 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 ...
3
votes
2answers
3k 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 ...
0
votes
2answers
44 views

Fetch user profile service in object model

How to call user profile service in client object model (ECMA)? I need to fetch department ID or name of current logged in user in Sharepoint 2010.
1
vote
2answers
629 views

accessing the SP2013 Site Settings-->Master Page/Navigation settings etc using CSOM (client side object model)

I want to access the SP2013 Site Settings-->Master Page/Navigation settings etc using CSOM (client side object model) using JavaScript or REST service or Webservice which I can call from Javascript. ...
1
vote
1answer
63 views

Appove ListItem using Javascript in Office365

I'm trying to approve selected items from a list by pressing a custom button in the Ribbon. I can get the selected items. I can get the fields of the selected items. I can even update those fields. ...
0
votes
2answers
84 views

Compare current user login name with four custom sharepoint list 2010?

I have 4 custom list (test A, Test B, Test c,test D). I need to find current user login belongs to which list in sharepoint. if current user belongs to Test b list i need to show pop up "U belong to ...
4
votes
3answers
3k views

SharePoint 2013 Call the REST API from SharePoint hosted app

I've successfully deployed a SharePoint hosted app to office 365 and my local on premise installation. All the app aims to do is call the REST API for the user profile manager to get the profile ...
0
votes
1answer
84 views

Get all files under subfolder in Shared Documents list - SP Object Model

I am trying to get all files in a subfolder, in the Document Library "Shared Documents" in SP 2010. So the structure looks like http://sp2010site/sitename/shared documents/folder1/ ...
1
vote
3answers
103 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.
3
votes
5answers
8k 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 ...
1
vote
1answer
44 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
55 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
130 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 ...
1
vote
1answer
2k views

Convert Image src to base64 [closed]

I am working on Sharepoint 2010, I have create one custom button. when user select any row from list and click on custom button then I have fetch one multiple line column html in one variable name ...
0
votes
1answer
47 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
37 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
1answer
108 views

Create external users using CSOM

Does anyone know if it's possible to invite external users with the client object model or is this only possible in the UI?
1
vote
2answers
48 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 ...
1
vote
1answer
546 views

Move documents from one folder to another in diferent library in different site collection from Client Object Model

I want find and move all documents from one folder to other in different site collection document library. Both the folders are at the sub folder level 3 from the actual list. Please let me know how ...
0
votes
2answers
99 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
86 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
63 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() ...
1
vote
2answers
332 views

Getting ECMAScript Client OM Intellisense to work in ASCX/JS

I can't for the life of me get intellisense working for the Client OM. It seems to work on another box I have tried so I'm wondering if I have found some kind of bug/configuration issue. I have tried ...
2
votes
3answers
2k 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 ...
2
votes
2answers
65 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
118 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
72 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 = ...
3
votes
1answer
143 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?
0
votes
1answer
2k views

How to get the managed metadata column value in a list client object model

I am trying to get values from a list for different columns like Title ,ID ,Region Where Region is a metadata column . I am able to get all the values except metadata column values . Pleas tell me ...
4
votes
2answers
2k 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 ...
2
votes
3answers
2k 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. ...
1
vote
0answers
37 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
53 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
183 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
2answers
351 views

Creating a SharePoint Wiki Page via JavaScript and REST or CSOM

I'm fairly new to developing SharePoint 2013 Apps, and I was tasked to customize the Create New Wiki Page for a Site. The user has to type in the Title, I do some processing, and then when everything ...
1
vote
2answers
252 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 ...