Archive for tag: SharePoint

Change top left SharePoint text

How to change the top left text in your SharePoint site.

Adjust the script below to fit your needs. Start the SharePoint Management Shell and run your adjusted script. Done!

$webApp = Get-SPWebApplication http://nuc

$webApp.SuiteBarBrandingElementHtml = "<div style='padding-left:12px'><a href='http://nuc/' style='color:white' title='Go to the Start page'>Our Home Site</a></div>"

$webApp.Update()

SPWebApplication.SuiteBarBrandingElementHtml property




Add SharePoint List row by posting a Soap Envelope

Example showing how to do a POST to a SharePoint list from a .NET web application. The purpose of the POST is to add a new row in a specific SharePoint list. 

In this example the list has three columns;

  1. Title, Single line of text
  2. MeasuredValue, Number
  3. TimeStamp, Date and Time

Parameters to adjust in the code sample;

  • listGUID
  • listURI
  • NetWorkCredential, YourADUserName, YourADPassword and YourDomain

References;

Code sample:

    Sub AddListRow()

        Dim Title As String = "Snowing"

        Dim MeasuredValue As String = "-2.3"

        Dim TimeStamp As DateTime = DateTime.Now

        Dim listGUID As String = "{0600A25B-2FFC-43B0-8AF9-7E73AA9013DA}"

        Dim listURI As String = "http://YourSharePointUrl/_vti_bin/lists.asmx"

 

        Dim soapEnvelope As New StringBuilder

        With soapEnvelope

            .AppendLine("<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">")

            .AppendLine("<soap12:Body>")

            .AppendLine("<UpdateListItems xmlns=""http://schemas.microsoft.com/sharepoint/soap/"">")

            .AppendLine(String.Format("<listName>{0}</listName>", listGUID))

            .AppendLine("<updates>")

            .AppendLine("<Batch>")

            .AppendLine("<Method ID=""1"" Cmd=""New"">")

            .AppendLine(String.Format("<Field Name=""Title"">{0}</Field>", Title))

            .AppendLine(String.Format("<Field Name=""MeasuredValue"">{0}</Field>", MeasuredValue))

            .AppendLine(String.Format("<Field Name=""TimeStamp"">{0}</Field>", TimeStamp))

            .AppendLine("</Method>")

            .AppendLine("</Batch>")

            .AppendLine("</updates>")

            .AppendLine("</UpdateListItems>")

            .AppendLine("</soap12:Body>")

            .AppendLine("</soap12:Envelope>")

        End With

 

 

        Dim client As New WebClient()

        With client

            .Credentials = New NetworkCredential("YourADUserName", "YourADPassword", "YourDomain")

            .Headers("SOAPAction") = "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems"

            .Headers("Content-Type") = "application/soap+xml; charset=utf-8"

            .Encoding = Encoding.UTF8

        End With

 

 

        Dim response As String = client.UploadString(New Uri(listURI, UriKind.Absolute), "POST", soapEnvelope.ToString)

 

        wcResult.Text = response

 

    End Sub

SharePoint Tools

A list of useful tools for managing SharePoint.


SharePoint Manager 2013 (2010)

The SharePoint Manager 2013 is a SharePoint object model explorer. It enables you to browse every site on the local farm and view every property.
Link: http://spm.codeplex.com/
SharePoint 2010 Version: http://spm.codeplex.com/downloads/get/526736


Stramit SharePoint Caml Viewer

Tool to help you write a correct CAML Query.
Link: http://spcamlviewer.codeplex.com/


SharePoint CAML Query Helper

Use this program to help build and test SharePoint CAML Queries (Collaborative Application Markup Language). Compatible with WSS 3.0, MOSS 2007, Foundation 2010, SharePoint 2010, and now SharePoint 2013.
Link: http://spcamlqueryhelper.codeplex.com/


SPServices

SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.
Link: http://spservices.codeplex.com/