SharePoint Survey List - EventReceiver
Run code when a survey response is finished by handling ItemAdded and ItemUpdated and checking the Completed field.
Tag
Run code when a survey response is finished by handling ItemAdded and ItemUpdated and checking the Completed field.
Add a custom action to the Actions menu of a SharePoint survey list using a module in an empty SharePoint project.
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<!-- Survey Actions Menu Dropdown -->
<CustomAction Id="6D6F6574-57CD-4BDD-88E5-9651A066140E"
RegistrationType="List"
Description="DescriptionGoesHere"Create a list field that appears on the display form but is hidden from the new and edit forms.
string newField = "<Field Type=\"Text\" MaxLength=\"50\" DisplayName=\"NewField\" Name=\"NewField\" ShowInNewForm=\"FALSE\" ShowInEditForm=\"FALSE\" />";
list.Fields.AddFieldAsXml(newField, true, SPAddFieldOptions.Default);Add the missing Sign in as Different User item to the SharePoint 2013 welcome menu by editing Welcome.ascx.
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\Welcome.ascxA sandbox solution cannot call Response.Redirect, so write a small script through a literal control instead.
<asp:Literal ID="litRedirect" runat="server" />Upload an attachment to a list item from a sandboxed visual web part by opening the AttachFile.aspx page in a modal dialog.
<script type="text/javascript">
function callback() {
alert('document uploaded');
}
function openPopup() {Build a document approval workflow in SharePoint Designer 2010 where the approver is picked from a column on the document.
A PowerShell script that empties a SharePoint 2010 document library by deleting its files and then its folders.
Add-PSSnapin Microsoft.SharePoint.PowerShell
# Replace siteurl with actual web url
$web = Get-SPWeb -Identity "siteurl"
# Replace docurl with document library url
$list = $web.GetList("docurl")Create a web part page and place a visual web part on it through a module's Elements.xml in Visual Studio 2010.
Reassign an existing SharePoint 2010 workflow task to a different user with SPWorkflowTask.AlterTask.
using (SPSite site = new SPSite("http://myteamsite:2012/"))
{
using (SPWeb web = site.OpenWeb())
{
SPUser user = web.SiteUsers["myad\\administrator"];
SPListItem taskItem = web.Lists["Shared Documents"].Items[0];XSLT 1.0 has no ends-with function, so compare the last characters of the string with substring.
<xsl:when test="substring($url, string-length($url) - 3) = '.pdf'">Use one advanced setting on the document library to keep its items out of search results.