FAQ Database Discussion Community


Access data from SharePoint-hosted app

sharepoint,sharepoint-2013
I am trying to get a grip of apps for SharePoint. What I have not yet clearly understood is whether it would basically be possible to access SharePoint-objects, e.g. a public outlook calendar, from a SharePoint-hosted app via the JSOM? Would I need a provider hosted app and access via...

SHAREPOINT 2013: How can I read Site column contents and modify them via javascript csom?

javascript,sharepoint-2013,csom
I'm relative new to Sharepoint 2013, I'm trying to access and display on a page the contents inside a specific "Site Column", I've have been reading a lot about this, but I still can't accomplish my task. So far I get to this: 'use strict'; var hostweburl; var appweburl; $(function...

Retrieve all instances of recurring event via CSOM

c#,rest,sharepoint-2013,sharepoint-api,sharepoint-online
I need to get all the instances of a recurring calendar event in Sharepoint 2013 online via CSOM. I read that it can't be done, that I need to do it via REST API directly. My question: 1) Is it possible to get the items from a View instead of...

Error deploying InfoPath form on Sharepoint 2013: The XSN cannot be used on the server

sharepoint,sharepoint-2013,infopath
I'm trying to deploy a InfoPath form to Sharepoint via Visual Studio, but I'm getting this error: Error occurred in deployment step ‘Add Solution': The XSN cannot be used on the server. I’m publishing the form to a network location. Any ideas?...

Add result source refinement in SharePoint 2013 search

sharepoint,sharepoint-2010,sharepoint-2013,sharepoint-designer,sharepoint-search
how can i filter between result sources in SharePoint 2013 search. can i add a refinement tab that allows me to further filter the search depending upon all the result sources available. I have added 5 result sources source 1,2,3,4,5 in the search page first i get search from all...

How to Get Worker Process ID(W3wp.exe) of Specific Sharepoint Application Pool(Not List of All)

visual-studio-2012,sharepoint,visual-studio-2013,sharepoint-2010,sharepoint-2013
I am using below command to find w3wp.exe ID which i have to attach in debugging,But it gives all W3wp.exe list C:\Windows\System32\inetsrv>appcmd list wp. I want to find only Specific 'Application Pool' w3wp.exe ID ? can anyone help me of this time saving idea?...

Web part custom properties Issues

sharepoint,sharepoint-2013
I have one webpart with custom properties and i want to use the same webpart more than one time on the same page ( or others ) just setting different values to the properties. But when I insert the webpart a second time on page, the new settings override the...

UpdateListItems throws “Cannot access a closed Stream.”

web-services,sharepoint-2013
I have been trying to find out the issue faced for some documents while uploading in libraries using list.asmx service in web application. The steps i follow: Uploads document using copy service. Update uploaded document properties. I am facing issue for some documents while updating their properties. I don't know...

FlexSlider : get the caption vertically on right side

javascript,css,sharepoint-2013,flexslider
I'm using the cool Felxslider to display a slideshow on a sharepoint installation. it works quite well, but i still have two questions : 1- How to display the caption (you know, the little transparent background with title/description of the picture) not on the bottom of the image, but on...

Get claims from custom STS token before sharepoint 2013 make spuser

sharepoint-2013
I'm trying get claim information from an STS token provided by our custom STS. When our STS ceates a token, it provides an email address and a custom field named registration number. Now I want to use the claim in SharePoint, I have no access to it because SharePoint makes...

Sharepoint 2013: CRUD operations on Site Columns

sharepoint,sharepoint-2013,crud,site-column
So far, I'm able to perform CRUD operations on Lists, I was wondering if it is possible to do it on Site Columns, I've try to find it on the web but I literally found nothing, I dediced to drop a question here just to understand if it is possible...

SharePoint oData API Only Returns 1000 Records

sharepoint,odata,sharepoint-2013,wcf-data-services
I am trying to query a SharePoint 2013 list using the Rest API for all items in the list. The problem is it only returns 1000 records max and I need to get all of the records. I am using the oData v4 API and auto generated service references for...

How to resolve cross domain error in REST Api while posting on specific group in yammer

javascript,rest,sharepoint-2013,yammer
I tried following code post in a specific group in yammer. function post() { yam.getLoginStatus( function(response) { if (response.authResponse) { console.log("logged in"); console.dir(response); //print user information to the console yam.platform.request({ url: "https://www.yammer.com/api/v1/messages.json" , method: "POST" , data: { "body" : "Welcome to the Yammer API World.", "group_id":"xxxxxxx"} , CORS: true...

Dynamically change content in SharePoint 2013 Search Snippet

javascript,jquery,css,sharepoint-2013
I have one function with one param and I have to get the data dynamically from NavDropdownListContainer and set it in the Search TextBox using JQuery or JavaScript. Please find below the screenshot and css related to it. SharePoint 2013 SearchBox Help would be appreciated. <div class="ms-floatLeft" id="SearchBox" name="Control"> <div...

Are you missing reference?

visual-studio-2010,sharepoint,sharepoint-2007,sharepoint-2013,sharepoint-upgrade
I am upgrading MOSS2007 solution to SP2013. Everything is fine When I am building the solution at that time it is building successgully. But when I am trying to publish the solution at that time it is throwing following error: The type or namespace name 'xxx' does not exist in...

SHAREPOINT 2013: How can I update a Site Column with the content of an array with javascript CSOM?

javascript,sharepoint-2013,csom,site-column
I'm relative new to Sharepoint 2013, I'm trying to update the content of a Site column with the content of an array, I can retrieve and visualize the content of my site column, the user is able to change and save the necessary part and the changes are saved into...

Sharepoint SiteUserInfoList get all keys and values

c#,sharepoint-2013,sharepoint-list
I need to get all key and value pairs from Sharepoint 2013 SiteUserInfoList list. I currently have following code: SPWeb web = new SPSite("http://sp2013:2013/_catalogs/users/detail.aspx").OpenWeb(); SPList item = web.SiteUserInfoList; foreach (SPListItem f in item.Items) { foreach (var it in f.Fields) { // Here I would like to print out key value...

SharePoint Timer Job is running but not executing

c#,sharepoint,sharepoint-2010,sharepoint-2013,sharepoint-timer-job
This feature is scoped at the site collection level. When the feature activated, the timer job is created in the web application with a generic name that includes the site collection URL that it's supposed to run in. In theory, when deactivating the feature in a site collection, it stops...

Adding a document to a document library

sharepoint,sharepoint-2010,sharepoint-2013
SPDocumentLibrary library = (SPDocumentLibrary)spweb.Lists["My Documents"]; SPFileCollection files = library.RootFolder.Files; String strFilename = System.IO.Path.GetFileName(HttpContext.Current.Request.Files[0].FileName); SPFile file = files.Add(library.RootFolder.Url + "/" + strFilename, HttpContext.Current.Request.Files[0].InputStream, true); When setting up an immediate alert (or daily alert) for a document library, the alert is triggered as soon as a document is added to the library....

Set Multi-User Field in Sharepoint using Powershell and TaskManager

powershell,sharepoint-2013
Im using the following to set/update a multi user field in Sharepoint using Powershell: [Microsoft.SharePoint.SPFieldUserValueCollection]$lotsofpeople = New-Object Microsoft.SharePoint.SPFieldUserValueCollection $user1 = $w.EnsureUser("domain\user1"); $user1Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user1.Id, $user1.LoginName) $user2 = $w.EnsureUser("domain\user2"); $user2Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user2.Id, $user2.LoginName); $lotsofpeople.Add($user1Value);...

Jquery to Change the width of td in table inside a div

jquery,sharepoint-2013
I have the following html how can i access the first table's td and change the width to 40% and 60% respectively using Jquery <div id="DeltaPlaceHolderMain"> <a id="mainContent" tabindex="-1" name="mainContent"></a> <table width="100%"> <tbody> <tr> <td width="15%" valign="top"></td> <td width="85%" valign="top"></td> </tr> </tbody> </table> <table width="100%"></table> <table width="100%"></table> </div> ...

SharePoint REST Service Create List Item Error The required version of WcfDataServices is missing.

rest,sharepoint-2013
I am trying to insert an item to a list (just a basic custom list with the title column) using the SharePoint Web Services. This is the code I am using function GetItemTypeForListName(name) { return "SP.Data." + name.charAt(0).toUpperCase() + name.slice(1) + "ListItem"; } var itemType = GetItemTypeForListName(lisNameTitle); var item =...

SharePoint 2013 App Deploy Error: “A different version of this App is already installed with the same version number”

visual-studio,visual-studio-2012,sharepoint,sharepoint-2013
I have developed a very simple Provider-Hosted App which I was deploying to our SharePoint Online Developer Site. Testing was going fine, and I had deployed it several times to the site, before I suddenly received this error in Visual Studio 2012 after I hit F5: Error occurred in deployment...

SharePoint 2013: Hello World remote app using REST configuration

rest,sharepoint,sharepoint-2013,access-token
I'm trying to create a website that gets a list items from my SharePoint 2013 site. I found this 'Hello World' app that uses REST on MSDN, but i'm having some trouble configurating it. In the configuration section says: To configure the Hello world remote app using REST sample, update...

SharePoint 2013 Can't load user profiles “HttpContext is in an assembly that is not referenced”

c#,asp.net,.net,sharepoint,sharepoint-2013
I'm trying to create a piece of code that will populate a list object with all of the users within the SharePoint user profile service. I have added references for Microsoft.SharePoint, Microsoft.Office.Server.UserProfiles and have the following block of code: using Microsoft.SharePoint; using Microsoft.Office.Server.UserProfiles; using System.Web; namespace code.runner.intranet.Dal { public class...

Error missing the extra metadata for an update/delete entity

rest,odata,sharepoint-2013,breeze
when saving (updating) opr delete Entities the "missing the extra metadata for an update/delete entity" Error is thrown. Breeze.Angular" version="1.1.1" Breeze.Angular.Directives" version="1.3.10" Breeze.Angular.SharePoint" version="0.10.0" Breeze.Client" version="1.5.3" Breeze.DataService.SharePoint" version="0.10.0" Breeze.Metadata.Helper" version="1.0.8" Read the Entites is no problem. When debugging breeze.labs.dataservice.sharepoint.js line 297 function updateEntityNode... metadata is obtained by Sharepoint, etag and...

how to find which object is causing “Attempted to use an object that has ceased to exist”

sharepoint,sharepoint-2013
I am not able to find which object is causing this exception. is there a way to find out which object is causing this exception. I tried to debug the code but this exception occurs after the page load event [COMException (0x80030102): Attempted to use an object that has ceased...

Discover SharePoint 2013 webservices

sharepoint-2013
I'm struggling to access to some data hosted on a website. I know this website was developed using Sharepoint 2013 (by someone else, and I don't have any contact with them). I have the right credentials to the site, and via browser I can navigate and obtain the data I...

How to check a checkbox in a default column list in sharepoint 2013 with powershell?

list,powershell,checkbox,sharepoint-2013
I have to write a script in powershell, and I'm new to it, to check specific checkbox when a sharepoint site is created. In a list, in sharepoint, we can go to list, change the display, and we can check the columns we want to display in the list. I...

Issues when trying to add new list items using the reference Microsoft.Sharepoint.Client

c#,winforms,sharepoint,sharepoint-2013
I'm trying to add new items into a Sharepoint List, using a winforms C# app, but I'm getting an error as if the app didn't find the list fields. My code: using SPC = Microsoft.SharePoint.Client; (...) string siteUrl = "https://sharepoint.company.com/sites/ProjectX"; SPC.ClientContext clientContext = new SPC.ClientContext(siteUrl); string userName = "someone.surname"; SecureString...

Find the first sub site name in current URL

jquery,asp.net,jquery-ui,sharepoint,sharepoint-2013
I am doing a check in current url. if my current subsite the first subsite from the root site has property. but i want to make it case insensitive so that either if it is property or Property it works fine. Is there a better way of doing this this...

Create a second form that references the same List (SharePoint 2013)

forms,sharepoint,sharepoint-2013
I want to create a second form that references to a created list, which already has some data in it. So the situation is that there's a list with jobs (offers and demands). With one form that exists users can insert a offer, but now I need a second one...

SharePoint 2013 - Programmatically access the file in directory from the path present in database table

database,directory,sharepoint-2013
I have a database table with columns like the serial number that is present in the SharePoint list, name of a file and path in which it is stored. That path is a directory path where the file is stored. I need to access that path and then get the...

How to use powershell and the (S)SOM to upload files/directories into sharepoint 2013 in Office365?

powershell,sharepoint,sharepoint-2013,office365
I would like to start up a new script, which takes in a Local file path, and a document library name, and then scrapes the directory, and uploads all files/folders found into the sharepoint 2014 office 365 document library (server side object model {SOM}). I have tried the following, to...

Making jslink target specific list

sharepoint,sharepoint-2013,jslink
Background I got a page where I’m showing two list views from two separate lists which both have Custom List as their ListTemplate. They got their separate jslink file cause I don’t want them to look alike. Problem The js link file targets both listviews since they use the same...

property mappings in display template

search,sharepoint-2013,display-templates
I think I'm missing something with the ManagedPropertyMapping tag on display Templates. Indeed I have this code originally: <!--[if gte mso 9]><xml> <mso:CustomDocumentProperties> <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden> <mso:MasterPageDescription msdt:dt="string">Displays a result tailored for a web page.</mso:MasterPageDescription> <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId> <mso:TargetControlType...

Angularize SharePoint Client Side Taxonomy Picker

angularjs,sharepoint,sharepoint-2013,sharepoint-apps
The Patterns and Practices team has released a client side taxonomy picker for use when integrating with SharePoint. It works well, but uses jQuery and my SharePoint App is built in Angular... which seems to be a growing trend. I would like to leverage the client side taxonomy picker in...

“add data driven subscription” missing in SSRS sharepoint mode

sharepoint,reporting-services,sharepoint-2013,ssrs-2012
I'm using sharepoint 2013 with SQL server 2012 Enterprise Edition SP2. I am using SSRS in sharepoint integrated mode. When I hover over report options I see the "Manage Subscriptions" option and when I click it I can see the "add subscription" option. However, the "add data driven subscription" is...

How to retrieve Sharepoint List in Sharepoint App?

javascript,list,sharepoint,sharepoint-2013,sharepoint-list
I have my app and my list in my site contents like so: From my app, I'd like to read, write, and manipulate the data from TestList. The contents of TestList are like so: I've been trying to read it using this: function setup() { var context = SP.ClientContext.get_current(); var...

webpart value gone after page reload

c#,asp.net,sharepoint-2013
first of all i am using sharepoint, basically my objective is easy, what i want to do is to update my webpart properties and use it for future. string _SavedCondition; [WebBrowsable(false), Category("New"), Personalizable(PersonalizationScope.Shared), WebDisplayName("ConditionStore")] public string SavedCondition { get; set; } above is my webpart control i have a button,...

How to make People Picker column Read only in SharePoint 2013

sharepoint-2013,office365
I am trying to make people picker column in my list edit form "Read-only". I found many solutions that worked on SharePoint 2010 but couldn't find a reliable solution for SharePoint 2013/Office 365. It would be great if someone can point me to a good solution....

Comparing the InnerHTML of an object in jQuery

javascript,jquery,dom,comparison,sharepoint-2013
I am able to get the .html() of a SharePoint textbox, which in the DOM simply appears as a <div>. When the textbox is empty, the InnerHTML of that <div> simply appears as <p></p>. Because this particular textbox does not always appear (I control its appearance based on the selected...

Sharepoint 2013 Search results for Powerpoint files

sharepoint,sharepoint-2013
I have Sharepoint 2013 search site with many documents uploaded in Document Library, I created a custom page with Search results webpart,when i tried to find a powerpoint file named x in search results webpart, it shows result title as "Powerpoint Presentaion" but the actual title is "Some title",Please provide...

How to get a List from a List Collection? getByTitle returns empty list

javascript,list,sharepoint,sharepoint-2013,sharepoint-list
So I retrieve a bunch of lists from host-web and put them into a listCollection similar to as outlined here. Then I try to access a specific list called TestList. However, I can't access it from the listCollection using getByTitle("TestList"). It will give me a list with no information from...

SharePoint 2013 Calculating Scores

if-statement,sharepoint-2013,calculated-columns
I am working in SharePoint 2013. I am trying evaluate the work of my staff and will be using a list to track this and want to assign a grade to the results. If the person gets a 4 out of 5 I want them to receive 80%. The way...

Problems retrieving content controls with Open XML sdk

ms-office,sharepoint-2013,openxml,openxml-sdk
I am developing a solution that will generate word-documents. The word-documents are generated on the basis of a template document which has defined content controls. Everything was working good for me when I had only one content control in my template, but after expanding the template document with more content...

Override sharepoint emailing service with your own

sharepoint-2013
I have a REST web-service which every application in my organization uses to send out emails instead of using anything external. Basically, it accepts, body, subject, TO, FROM etc...And sends out an email. Is it possible to configure Sharepoint to use my service instead of using it's own internal emailing...

SPContext.Current.Web.CurrentUser; return wrong user

sharepoint,sharepoint-2013
when execute this statement SPContext.Current.Web.CurrentUser it gives me user SharePoint\system and when I execute this statement if (profileManager.UserExists(username)) { } it says user not found. I logged in with SharePoint\spadmin. why it is returning wrong user name....

Extend people search, custom result source

sharepoint-2013,sharepoint-search
I've made a a custom result source based on "Local SharePoint Results", where I use this "Query Transform" {?(({searchTerms}) ContentClass=urn:content-class:SPSPeople)} {?OR (({searchTerms}) spcontenttype:contact)} My search results work, I get both spspeople and contacts. What I cant figure out is why the spspeople object is presented in the search result as...

How to edit programmatically a row of a sharepoint List without Event receiver

visual-studio-2013,sharepoint-2013
please i need your help, i want to edit programmatically a SharePoint 2013 List. I get some Datalist from a Service and i need to edit some special field in Sharepoint list. i don't know how to do it. Please has somebody an idea?

What is the difference between content=“IE=edge” & content=“IE=10”

html5,sharepoint-2013,internet-explorer-11
My interanet site not loading in edge mode. But it's working fine in chrome and Firefox. Can some one help me out on this. I am using IE 11 windows 8.1

CAML query contains does not work

sharepoint,sharepoint-2013,caml
I've got this code, which takes a part of the title to perform a query and filter part of the content of a list: <script type="text/javascript"> var items_lista; SP.SOD.executeFunc('sp.js', 'SP.ClientContext', Initialize); function Initialize() { var PDP_Link_Filter = $("title").text().split("-")[1].split(".")[0]; PDP_Link_Filter = "Link_" + PDP_Link_Filter + "_"; var contexto = SP.ClientContext.get_current(); var...

Search SharePoint Foundation 2013 Picture Library by terms defined in Keywords field

metadata,sharepoint-2013,search-engine,picturegallery
Since Term Store functionality (and probably most of metadata functionality) isn't available in SharePoint Foundation 2013, I couldn't find a way to search through the pictures using some sort of tagging. Thus I decided to employ something what is available already in Foundation version. When you edit the picture, you...

Creating term fails in SP 2013

c#,sharepoint,sharepoint-2013,csom
I am trying to create a term in a SP 2013 term set. I am able to read the terms from the term set with the given credentials. Settings: The ServiceAccountLogonName user is one of the Term Store Admins Code: var siteUrl = ConfigHelper.GetValue("SharepointSiteUrl"); var clientContext = new ClientContext(siteUrl); clientContext.Credentials...

ReferenceError: _spPageContextInfo is not defined

javascript,ajax,angularjs,sharepoint-2013
I have the following code in my js file: var configNews = { url:_spPageContextInfo.webAbsoluteUrl, newsLibrary: 'DEMONews', listId: '' }; // Getting the ListID $.ajax({ url: configNews.url + "/_api/web/lists/getbytitle('" + configNews.newsLibrary + "')?$select=Id", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (data) { // Returning the results configNews.listId =...

Execute SharePoint Function On Page Load in AngularJS Application ($scope issue???)

javascript,angularjs,sharepoint,sharepoint-2013,sharepoint-api
I am using SharePoint's JavaScript Object Model in an AngularJS app and need one of its functions to execute on page load so an array is populated and used by an ng-repeat. Currently, it logs to the console the array push on page load, but does not appear to commit...

NullReferenceException I can't seem to solve with Null Collase operator [duplicate]

c#,.net,sharepoint,sharepoint-2013,nullreferenceexception
This question already has an answer here: What is a NullReferenceException and how do I fix it? 17 answers I have a SharePoint list that I'm reading. In this list there are a number of items that don't have a value assigned to them, throwing an error. The code...

Using angular submit button causes redirect instead of calling function in SharePoint

angularjs,sharepoint,sharepoint-2013
I have a form within my angular app (within SharePoint) that uses routing via hashbang, but when I click on a button in my form, it redirects to the root (like it can't resolve the URL so it uses the otherwise setting in my config), instead of executing the function....

how to use addin developed with microsoft.sharepoint.dll in other system

sharepoint-2013
I've developed an outlook addin in vs2013. The development machine has sharepoint installed. My code has: using Microsoft.SharePoint; But when I run this code on a client machine it shows an error. enter image description here.In some sites they suggest using Microsoft.SharePoint.Client.dll. Can anyone help?...

“Global” groups without AD

sharepoint,sharepoint-2013
I want to create a "global" group, which I can use to grant access to different site collections. I.e.: I can give readers rights to collections 1 and 3 and no rights to collection 2. Is it somehow possible? I tried to create the group in CA, but I can't...

KQL - Ignoring items with property not equal to value

search,sharepoint-2013
I have to configure the site search so that it does not include items wich have a property of ModerationStatus != 1. I found out that using a query like ModerationStatus <> 1 can probably solve my problem, but I am not sure if it will work in my environment...