FAQ Database Discussion Community


Configure SharePoint 2010 UPS with PowerShell

powershell,sharepoint,sharepoint-2010,ups
SOLUTION FOUND: For anyone else that happens to come across this problem, have a look-see at this: http://www.harbar.net/archive/2010/10/30/avoiding-the-default-schema-issue-when-creating-the-user-profile.aspx TL;DR When you create UPS through CA, it creates a dbo user and schema on the SQL server using the farm account, however when doing it through powershell it creates it with...

Why does this event fire asynchronously?

c#,asynchronous,sharepoint-2010,radio-button
I've got this code to prevent two opposite radio buttoms from both being checked: RadioButton rbUSCitizenOrPermResY = null; RadioButton rbUSCitizenOrPermResN = null; . . . rbUSCitizenOrPermResY = new RadioButton { CssClass = "finaff-webform-field-input" }; // doesn't allow assignment to CheckedChanged above rbUSCitizenOrPermResY.CheckedChanged += new EventHandler(rbUSCitizenOrPermResY_Changed); . . . private void...

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?...

Sharepoint 2010 Exception error

c#,asp.net,exception,sharepoint-2010,master-pages
I perfomed in past days a migration of a web application from Sharepoint 2007 to Sharepoint 2010. I noticed some exception error on a page of the web site which where caused by one webparts on the page. Appending the query string ?contents=1 to the address page in the browser...

Placing VSDocman external files on Sharepoint

visual-studio,sharepoint,visual-studio-2013,sharepoint-2010
I am wanting to generate all of our application documentation using VSDocman and put them on Sharepoint. The act of uploading the finished documentation to Sharepoint isn't an issue and can be done fairly easily. The issue I have however is that VSDocman will not let me embed images in...

Does CAML Query has a default RowLimit value?

sharepoint-2010,caml,sharepoint-list
I am wondering wether SharePoint CAML Query has a default Rowlimit value. I have created a list which will contain more than 10 000 items in a near future. I use a CAML Query on client-side to export the items to a custom file. The query does not specify any...

Sharepoint 2010 Blog - Order rest query by Category

json,rest,sharepoint,sharepoint-2010
I've created a blog on Sharepoint 2010 and want to query the list via REST for reporting. I want to order the list by the default field Category (internal name PostCategory). Unfortunately, this is a multiselect field, therefore a simple "?$orderby=Category" doesn't work. I've also tried to expand the Category,...

SharePoint group by view with jQuery

jquery,sharepoint-2010
I have a jQuery to display pictures as thumbnail. It works great but as soon as I add grouping to the view then the pictures do not show up as thumbnail. They show up with traditional file type icons (icjpg.gif, icpng.gif, etc.). Any idea how to fix this? <SCRIPT type=text/javascript>...

Why does my Sharepoint WebPart deploy (nominally), but is still not available for adding to a page/form?

sharepoint,sharepoint-2010,web-parts,webpartpage
I've created and "deployed" my latest Web Part (Visual Studio grins from ear-to-ear, and tells me, "Deploy succeeded"). But when I go to our Sharepoint site, and my "sandbox" page, and Edit it, I do not see the WebPart. As the Elements file shows, it should be available from the...

how to use Or operator in jquery

jquery,sharepoint-2010
I am trying to user or operator in jquery but looks like the code renders without error but it's not implemented. only icjpg.gif are rendered on the page. <SCRIPT type=text/javascript> $(document).ready(function(){ $("img[src$='icjpg.gif']").each(SetImage) || $("img[src$='icpng.gif']").each(SetImage); }); function SetImage() { $(this).attr('height','100'); $(this).attr('src','/it/Site/DocLib/'+$(this).attr('title')); } </SCRIPT> ...

CAML query filtering is not working

c#,.net,sharepoint,sharepoint-2010,caml
I've googled that it can be in case when query is not well-formed. But I'm verifying it for several hours and didn't find any mistake. Problem is common: query doesn't filters and returns all data. I have no idea what is wrong, because I checked this query in Stramit CAML...

SharePoint 2010 - Adding filter to refinement panel

search,sharepoint,sharepoint-2010
I know there are threads out there about making changes to the refinement panel and they have so far been very helpful but now I have a question that I need a bit more assistance with. I've created a new filter for the refinement panel. That worked very fine. I...

How can I add jQuery to a WebPart (to respond to certain events on the WebPart)?

c#,jquery,sharepoint-2010,web-parts
I started down the path of adding an UpdatePanel to my Sharepoint page so that I can respond to events that take place (such as the checking of checkboxes and mashing of radio buttons, etc.). That so far has, however, been wrought with frustration and all that rot, as can...

Upload file to SharePoint 2010 using PowerShell and the OData API

powershell,sharepoint,sharepoint-2010,odata,powershell-v3.0
I'm attempting to upload a file to SharePoint 2010: Function Add-Attachments() { [CmdletBinding()] Param( [Parameter(Mandatory=$True)] [int]$Id, [Parameter(Mandatory=$True)] [string[]]$Paths ) BEGIN {} PROCESS { $url = "http://server/resource/_vti_bin/listdata.svc/TheList($Id)/Attachments" Foreach ($Path in $Paths) { Write-Verbose "Attaching $Path ..." $headers = @{ 'Slug' = "TheList|$Id|$(Split-Path $path -Leaf)" } $Payload = @{filename=(Split-Path $path -Leaf);filecontent=([IO.File]::ReadAllBytes($path))} Invoke-WebRequest...

I am getting a The type or namespace name 'listcolumns' could not be found (are you missing a using directive or an assembly reference?)

generics,sharepoint-2010,.net-3.5
Ok, so I have this code which keeps tossing the error above. I am really pulling my hair out trying to figure it out. using System; using System.ComponentModel; using System.Web; using System.Web.UI; using System.Collections.Generic; using System.Collections; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; namespace VarianceList.WebPart1 { [ToolboxItemAttribute(false)] public class...

How can I overwrite a LiteralControl's text only if the LiteralControl has not already had text assigned to it?

c#,sharepoint-2010,nullreferenceexception
This code: private void btnSave_Click(object sender, EventArgs e) { LiteralControl message = null; try { message = new LiteralControl(); Controls.Add(message); ConditionallyCreateList(); SaveInputToList(); List<ListColumns> listOfListItems = ReadFromList(); GeneratePDF(listOfListItems); // using iTextSharp } catch (Exception ex) { message.Text = String.Format("Exception occurred: {0}", ex.Message); } if (message.Text.Length <= 1) { message.Text = "Saving...

how to get a list of all content type groups using sharepoint client model in c#

c#,visual-studio-2012,sharepoint,sharepoint-2010
I am developing a windows application that will allow user with an interface to create custom content-types. Everything is done except I want a dropdown list that will show all available content-types, just like the Sharepoint has. What I've achieved so far is: var contentTypes = context.Web.AvailableContentTypes.Where(q => q.Group ==...

Can I access a control by the last portion of its ID in jQuery?

jquery,dynamic,sharepoint-2010
I have a dynamically-created control which I gave the ID "ckbxEmp" As I discovered by "Viewing Source," Sharepoint (or Chrome, or "somebody") impertinently and presumptuously re-Ids (and names it, and "for"s it) this control, giving it the Welsh-esque "ctl00_ctl24_g_1caf4ad1_092d_4224_bd10_28ab028aab50_ctl00_ckbxEmp" And so (I assume this is the reason), all attempts to...

Why does this jQuery not only not work, but break all the other jQuery?

jquery,sharepoint-2010,html-table
I am doing some "fancy" hiding (slideUp and slideDown) of elements on a Sharepoint WebPart. I added another handler, though, for a button: $(document).on("click", '[id$=btnAddFoapalRow]', function (e) { alert('you mashed the foapal button'); if ($('[id$=foapalrow3]').css('display') == 'none') { $('[id$=foapalrow3]').slideDown(); } else if ($(['id$ = foapalrow4]').css('display') == 'none') { $('[id$=foapalrow4]').slideDown(); }...

How can I respond to a RadioButton's change event with jQuery on a SharePoint WebPart?

jquery,sharepoint-2010,web-parts,document-ready
I'm getting close; after floundering around on an isolated promontory and sending forth filament, filament, filament out of myself (as recorded here), I added this to the end of the WebPage's *.ascx file (after the <%@ Assembly, <%@ Register, <%@ Import, and <%@ Control jazz, as well as an <script>...

This powershell doesnt give item count to all the sub or sub-sub or sub-sub-sub folders

powershell,sharepoint,sharepoint-2010,count
I am trying to get a count of each folders in a document library. There are many folders under the parent. Each folder may have few more folders and each one of this may have child, grand child folders. I can add lot more coding but I have a feeling...

Update SharePoint list entry using ListData.svc and PowerShell

powershell,sharepoint,sharepoint-2010,odata,powershell-v3.0
Is there a way to update a SharePoint 2010 list entry using PowerShell without using the SharePoint client? If so, how? To get the desired fields, I would: $url = 'http://myserver/resource/_vti_bin/ListData.svc/TheList(1234)?$select=Id,Title,StartingDate,Hours' $webRequest = Invoke-WebRequest -Uri $url -Method Get -UseDefaultCredentials [xml]$xml = $webRequest.Content $properties = $xml.feed.entry.content.properties $properties | Format-Table -Property Id,Title,StartingDate,EndingDate,Hours...

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...

How can I dynamically create a DIV in C#, add child elements to it, and then hide the DIV (and everything on it)?

c#,jquery,html,sharepoint-2010
I've found one way to skin this cat from this which led to this, but I'm wondering if it might be better to put all my "slide-uppable" elements on a div, and then slide up that div? To be more specific, I'm creating controls in C# dynamically for a Sharepoint...

Formula for a calculated field to convert string to date()in share point

sharepoint-2010,calculated-columns,date-calculation
we have a list where the date is saving as YYYY-MM-DD format in a column of single of text. Now i need a formula for calculated column of Date type to save the string date(YYYY-MM-DD) to DD-MM-YYYY of date type. any help or suggestions please.....

How to group and filter Sharepoint webservice XML response in Powershell

powershell,sharepoint-2010
I have a need to send automated emails based on Sharepoint list. I am able to retrieve the response and have code to send emails. But the email message body needs to be dynamic and need response date to be grouped. I am thinking of converting service response to represented...

How to dynamically create Sharepoint ComboBoxes?

c#,date,combobox,sharepoint-2010
I dynamically create Textboxes with C# in my Sharepoint project like so: boxRequestDate = new TextBox { CssClass = "dplatypus-webform-field-input", Text = DateTime.Today.ToShortDateString() }; ...but I need ComboBoxes (or their HTML equivalent), too, at times. How is that done? "ComboBox" is not recognized in Sharepoint. Surely there's a way to...

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...

Qlikview document reload fails due to authorization restrictions on SharePoint 2010

sharepoint,sharepoint-2010,qlikview
The situation I have created a Qlikview document based on SharePoint 2010 list data. The document is working just fine and I am able to reload data from my desktop, and ready to deploy to our Qlikview server. The problem However, when I run a script ("C:\Program Files (x86)\QlikView\Qv.exe" /r...

Use Microsoft Office 2013 interop dll in sharepoint 2010

sharepoint,sharepoint-2010,ms-office,office-interop,excel-interop
Is it possible to use interop dll from Office 2013 in Sharepoint 2010 solutions? I need to use excel in my Sharepoint solution, but on server was installed Office 2013 and i cant chose Microsoft.Office.Interop.Excel. Thanks a lot...

How to use inline conditional (if then else) in XSLT?

xslt,sharepoint,sharepoint-2010,xslt-1.0,dataviewwebpart
Is it possible to do inline conditionals (if then else) in XSLT? Something like: <div id="{if blah then blah else that}"></div> Or a real use-case/example: <div id="{if (@ID != '') then [email protected]' else 'default'}"></div> ...

Simple javascript calculation

javascript,html5,sharepoint-2010
Its been many years that I've had to do anything with javascript. Feel like I need to take a course just to relearn the basics. Trying to create a simple calculation with two input fields. Found the following solution on another post but it is not working for me. <script>...

Displaying server name last 4 digits only using javascript

sharepoint,sharepoint-2010
I am trying to display the server name of my server in commented region. I can display the server name however, we are not allowed to display the whole server name. i am using following code to display the server name that can be read in page source view.. <!--<%=Environment.MachineName%>-->...

How can I set a Button's type to “Button” (as opposed to the default “Submit”) in C#?

c#,dynamic,sharepoint-2010,submit-button,htmlbutton
According to an answer here, I can prevent a button from submitting the form by setting its type value to "Button", like so in HTML: <button type="button">Cancel changes</button> ...but how can I do this in C#? I am creating my controls dynamically, something like this (pseudocode, as I'm away from...

sharepoint workflow to create a new item in another list if it's not already existing

sharepoint-2010,sharepoint-designer,sharepoint-workflow,infopath2010
I have two lists, A and B. I want to create new item in list B once I submit an item in list A. But, I want to check first if the item already exists in list B. If it exists, just update the existing item or delete it and...

Why is OnPreRender being called over and over again?

asp.net,sharepoint-2010,web-parts,pageload,webpartpage
In my Sharepoint 2010 WebPart, I have this code: protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); if (this.dpsvisWebPart != null && this.dpsvisWebPart.CustomTitleProp != null) { lbl_Title.Text = String.Format("<h1>{0}</h1>", this.dpsvisWebPart.CustomTitleProp.ToString()); if (this.dpsvisWebPart.CheckboxGenSection1) { GenerateSection1(); } if (this.dpsvisWebPart.CheckboxGenSection2) { GenerateSection2(); } if (this.dpsvisWebPart.CheckboxGenSection3) { GenerateSection3(); } if...

What are the supported types for sharepoint lookup columns?

sharepoint,sharepoint-2010
I found that not all fields are supported as lookup fields. I tried to find a supported fields list but haven't been able to find one (google or even msdn)...... So far, I found that Choice, Mutiple Lines of text, Yes/No columns are not supported. Does anyone have any idea...

Get today's items from sharepoint list

sharepoint-2010
i'm trying to get today's items from a sharepoint list as below: however returning with empty. SPSite site = new SPSite(url of site); SPWeb web = site.OpenWeb(); SPList olst = web.Lists[ListName]; SPQuery oqry = new SPQuery(); qryAdminTick.Query = "<Where><Eq><FieldRef Name='Created' /><Value IncludeTimeValue='FALSE' Type='DateTime'>" + DateTime.Now.ToString("yyyy-MM-dd") +"</Value></Eq></Where><OrderBy><FieldRef Name='Created' Ascending='False' /></OrderBy>"; SPListItemCollection...

SharePoint 2010 - IsNotBlank formula

sharepoint,sharepoint-2010
Read a few threads about this. Maybe my brain is dead today but I can't figure out how to do a not blank formula in a calculated column. What i want to do is to show an icon in a column IF another column is not blank (ie. contains some...

Powershell error Add-PSSnapin “Microsoft.SharePoint.PowerShell”

powershell,sharepoint,sharepoint-2010,powershell-v2.0
I am getting an error when I run below command from sharepoint 2010 managment shell using admin rights. Add-PSSnapin Microsoft.Sharepoint.Powershell Add-PSSnapin : Cannot add Windows PowerShell snap-in Microsoft.Sharepoint.Power shell because it is already added. Verify the name of the snap-in and try again ...

sharepoint 2010 get value of choice field through api call

rest,sharepoint,sharepoint-2010
I have a sharepoint list ImageList, i have a column which stores its type The column name is ImageType the choices are "profile pic","thumbnail" etc i want to fetch these choice values for this field i tried accessing it using http://myintranet:2010/sites/ImagesGallery/_vti_bin/listdata.svc/ImageList?$expand=ImageType but it is not containing the choice values in...

Create folder with powershell in sharepoint (webservices)

powershell,sharepoint,sharepoint-2010
I need to create a folder in sharepoint if it does not already exist. My powershell script is not running on the sharepoint server so I think I have to use the sharepoint web services? I am currently uploading files to sharepoint with powershell using webclient as below - but...

Why is this jQuery not sliding down/showing hidden (slid up) elements?

javascript,c#,jquery,sharepoint-2010
I create rows with IDs of foapalrow3 and foapalrow4 in C#, making them temporarily invisible: foapalrow3 = new HtmlTableRow(); foapalrow3.ID = "foapalrow3"; . . . foapalrow3.Visible = false; foapalrow4 = new HtmlTableRow(); foapalrow4.ID = "foapalrow4"; . . . foapalHTMLTable.Rows.Add(foapalrow4); foapalrow4.Visible = false; I then have jQuery to condtionally make this...

Why is this jQuery not working on my Sharepoint page?

jquery,html,checkbox,sharepoint-2010,web-parts
I have this code at the bottom of my Sharepoint WebPart's .ascx file: <script> $(document).ready(function () { alert("The ready function has been reached"); $('#ckbxEmp').on("change", function () { if ($('#ckbxEmp').prop("checked")) { alert("Checked"); } else { alert("Not checked"); } }); }); </script> On running the WebPart (opening a page that has the...

Create Outlook meeting on SharePoint page

sharepoint,sharepoint-2010,outlook,interop,meeting-request
Is it posible to create outlook meeting on Sharepoint page behalf on current sharepoint user? I try to create meeting by button click with next code Application oApp = new Microsoft.Office.Interop.Outlook.Application(); AppointmentItem appointment = (AppointmentItem)oApp.CreateItem(OlItemType.olAppointmentItem); appointment.Start = DateTime.Now.AddHours(1); appointment.End = DateTime.Now.AddHours(2); appointment.Subject = "Some subject"; appointment.Body = "Some body"; appointment.Recipients.Add("[email protected]");...

Specifying Powershell version in Shortcut Target not working

powershell,sharepoint-2010
I have two Windows Server 2012 R2 64bit Setup identially and have SharePoint 2010 Management Shell shortcut links pinned to my task bar. Both the shortcuts specify -Version 2 but only one server seems to honor that flag. Why is on server not honoring the version 2 flag? On one...

How can I select a value from a DropDownList element using jQuery?

jquery,sharepoint-2010,html-select
In my Sharepoint page, I'm dynamically creating dropdownlists like so: ddlDepartureDateMonth = new DropDownList(); ddlDepartureDateMonth.ID = "departurDateMonth"; ddlDepartureDateMonth.CssClass = "finaff-webform-field-input"; ddlDepartureDateMonth.Items.Add(new System.Web.UI.WebControls.ListItem("Jan", "1")); ddlDepartureDateMonth.Items.Add(new System.Web.UI.WebControls.ListItem("Feb", "2")); ddlDepartureDateMonth.Items.Add(new System.Web.UI.WebControls.ListItem("Mar", "3")); ddlDepartureDateMonth.Items.Add(new...

Cannot load value of “multiple line of text” using COM in javascript

javascript,sharepoint-2010,client-object-model
The column name is "Dialog Box". I tried this var context = new SP.ClientContext.get_current(); var targetList = context.get_web().get_lists().getByTitle("myList"); var targetListItem = targetList.getItemById(_spGetQueryParam('id')); context.load(targetListItem, "Dialog Box"); context.executeQueryAsync(Function.createDelegate(this, onStatusQuerySucceeded), Function.createDelegate(this, onStatusQueryFailed)); function onStatusQuerySucceeded() { alert(targetListItem.get_item("Dialog Box")); } function onStatusQueryFailed(sender,...

How can I save values from a textbox (input == text) as Currency values in Sharepoint?

c#,sharepoint-2010,decimal,currency,typeconverter
I have Sharepoint list values that are Currency, such as: list.Fields.Add("Airfare", SPFieldType.Currency, false); But how do I save these values into the list as the Currency type? I tried this: spli["Airfare"] = (SPFieldType.Currency) boxAirfare.Text; ..and this: spli["Airfare"] = boxAirfare.Text as SPFieldType.Currency; ...but they won't compile, telling me, "'Microsoft.SharePoint.SPFieldType.Currency' is a...

Display element's attribute using PowerShell's Format-Table

powershell,sharepoint,sharepoint-2010,powershell-v3.0
Assuming Atom feed's XML: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <feed ... > <title type="text">Attachments</title> <id>http://server/list/_vti_bin/listdata.svc/list(1234)/Attachments/</id> <updated>2015-05-12T13:00:05Z</updated> <link rel="self" title="Attachments" href="Attachments" /> <entry> <id>...</id> <title type="text">spreadsheet.xlsx</title> <updated>2015-05-12T13:00:05Z</updated> <author>...

Opening different web pages in a control/block/panel/plugin on the same page

jquery,jquery-plugins,sharepoint-2010,content-editor
I need to develop a page where there would be a list of links on left and clicking on a particular link opens a web page in a control/block/panel/plugin/etc but on the same page. The idea is to open different web pages but on the same page in a control/block/panel/plugin/etc....

Escape single quotes in PowerShell

powershell,sharepoint,sharepoint-2010,powershell-v3.0
I'm trying to build a SharePoint 2010 listdata.svc query that resembles: http://server/FooList/_vti_bin/listdata.svc/FooList?$select=Title,Id,OwnerId,Status&$filter=(OwnerId eq 1234 and Status eq 'Ready') Single quotes don't work: $url = $url + '&$filter=(OwnerId eq 1234 and Status eq 'Ready')' Nor does escaping them with back-ticks: $url = $url + '&$filter=(OwnerId eq 1234 and Status eq `'Ready`')'...

Can REST-like URLs be passed/recognized in sharepoint 2010?

c#,rest,sharepoint-2010,web-parts,dynamic-usercontrols
I know that REST can be used to query list data in SharePoint (even in SP 2010). What I need, though, is a REST-like (not necessarily literally "canonical" REST) way to generate a Web Page. Here is my scenario in more detail: I dynamically create controls via C# when the...

How can I reduce the amount of vertical space between lines of text using CSS?

css,sharepoint-2010,web-parts
The "obvious" answer is to use the line-height CSS rule, but this code (where I do use that): private void GenerateSection7() { var headerFirstPart = new Label { CssClass = "finaff-webform-field-label", Text = "<h2><strong>Section 7: Submit Information </strong></h2>" }; headerFirstPart.Style.Add("display", "inline-block"); headerFirstPart.Style.Add("white-space", "pre"); headerFirstPart.Style.Add("line-height", "20%"); var headerSecondPart = new Label...

Is the jQuery version I can use limited by the .NET version I am using (in Sharepoint apps)?

jquery,asp.net,sharepoint-2010,.net-3.5,version
I asked this on the jQuery forum, but was told it would be better to ask elsewhere, so here goes: Very soon (starting next week), I am going to be doing Sharepoint 2010 development, which uses .NET 3.5. JavaScript / jQuery is part of this world, or can be (client-side...

CAML Query for lookup field with multi values

sharepoint,sharepoint-2010
What is the caml query for a Lookup field with multi values? So far, I am using the following without success (it just throws an error). My Lookup column is: Lookup ------- 2;3 2 3;4 <Contains><FieldRef Name="LookupColumn"/><Value Type="LookupMulti">2</Value></Contains> What is wrong with that query??...

Cascading dropdown for sharepoint list that works with datasheet view

sharepoint,sharepoint-2010
I'm looking for a solution that implements cascading dropdown for sharepoint lists with ability to work with datasheet view. Any help is appreciated!...

How can I make this xml file valid so that I can view it in a well-formatted way?

xml,sharepoint-2010,sharepoint-list,xml-visualizer
I'm debugging an issue which I suspect has to do with the data (it only happens once in a great while, and possibly is only when a particular record is used*). The data in question is a Sharepoint list. I have an xml representation of the data that I would...

Lost Attachments using Sharepoint 2010 Content and Structure List Item Move

list,sharepoint,sharepoint-2010,archive,splistitem
TL;DR: Recently during a bulk move of list items from one list to another, many list item attachments didn't get moved with the items. I'm wondering what can cause this. The SharePoint 2010 Content and Structure move process is not very transparent and there are no logs that I know...

oData SharePoint Add List Item Containing Value Properties

c#,sharepoint,sharepoint-2010,odata,wcf-data-services
How do you save "Value" and "DataServiceCollection" objects that are part of another SharePoint list item? These are the only properties in my model that are not getting saved. The generated Food SharePoint model has these sort of properties: public class Food { DataServiceCollection<FoodIngredientValue> Ingredient; FoodStateValue State; string _StateValue }...

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....

How can I invisiblize groups of controls via jQuery?

javascript,c#,jquery,sharepoint-2010,invisible
In my Sharepoint project/Web Part/Web Page, I dynamically create page elements/controls using C# in the *.ascx.cs file. In the *.ascx file, I use jQuery for responding to events that happen on the page (selections, changes of checkbox states, etc.). I have a need to conditionally invisiblize groups of controls/elements on...

How to get sharepoint folder by name using CamlQuery

c#,sharepoint,sharepoint-2010,dynamics-crm-2011,caml
So I need to rename a sharepoint folder in a plugin from crm. The name of the folder is a fullname from a contact but in case of a typo in the name there needs to be a plugin to change the folder name in sharepoint aswell. I found a...

SharePoint 2010 Rest API error (Not retrieving data)

javascript,rest,sharepoint-2010
When I run the code below, I get the following error: "Unable to get property 'results' of undefined or null reference" $(document).ready(function() { var iceCreamApp = {}; iceCreamApp.Truck = new Array(); //Load data from list into array right away (function() { var url = "http://isaac.issharepoint.com/demo/_api/web/lists/GetByTitle('IceCreamTrucks')/items?$select=State"; $.ajax({ url:url, type:"GET", dataType:"json", headers:...

How can I reduce the width of an HtmlTableCell or otherwise join together two controls in an HtmlTableRow?

c#,html,asp.net,sharepoint-2010,web-parts
I am dynamically creating several HtmlTableRows and adding cells to them, like so: HtmlTable dynamicTable = new HtmlTable(); . . . // Create row 6 var row6 = new HtmlTableRow(); var cellLitCtrl_6 = new HtmlTableCell(); var cellTxtbx_6 = new HtmlTableCell(); row6.Cells.Add(cellLitCtrl_6); row6.Cells.Add(cellTxtbx_6); var mailStopStr = new Label { CssClass =...

Why move the key.snk file to the Properties folder in Sharepoint projects?

sharepoint-2010,strongname,snk,strong-named-key
It is "de rigeuer" here to move the key.snk file generated when a new project is created from its default location at the bottom of the Solution up into the Properties folder. This is not just a local "superstition"; it seems to be the "accepted method", as seen here But...

Access SharePoint expanded properties

powershell,sharepoint,sharepoint-2010,odata,powershell-v3.0
I'm accessing a SharePoint lists has an associated stakeholder entity--I'm having difficultly accessing the stakeholder's properties. The 'primary' content's properties are located on xpath /feed/entry/content/properties/*. The stakeholder's properties are located on xpath /feed/entry/link/inline/entry/content/properties/*. Assuming that I include the stakeholder's name in the odata query: http://server/list/_vti_bin/listdata.svc/TheList?$select=Id,Title,Stakeholder/Name&$expand=Stakeholder How do I reference the...

SharePoint Ribbon

sharepoint-2010
I can not write English, sorry. I Hide the Ribbon in SharePoint so that users who do not have access to administrator does not show, and that's settled, what happens now that does not show the user's name and can not leave the session. How I can redisplay only part...

Sharepoint Calculated Column If Statement Evaluation

sharepoint-2010,calculated-columns
I have a calculated column that always evaluates to true even when it should and I can't figure out why. Any help would be greatly appreciated, here is the column: =[Name]&" "&IF([num1]>0,"("&[num1]&")","")&" "&IF([num2]>0,"("&[num2]&")","") So I it should show num1 if it is > 0 and num2 if that is >...

Adding WCF Services / Project Templates in Visual Studio Pro 2013?

c#,wcf,visual-studio-2013,sharepoint-2010
I'm very new to .NET and developing within VS, and I'm trying to make a few basic WCF Web Services for testing purposes. I'm running Visual Studio Profession 2013 on a Win 7 x64 computer that is also running Sharepoint 2010 Server. I'm trying to go through the following tutorial:...