Technical Ramblings

Wednesday, October 11, 2017

Recently needed to do an update of eight farms for a client. Now I can never do as thorough of a job as Microsoft and others have done describing the process so I will not even attempt it. (see also links at bottom).

What I needed was a way to walk through the whole phase as simply as possible so I wrote and/or borrowed code for a PowerShell script to streamline the process

Parameters

[string] $farmaccount ="The Farm account to connect to SharePoint"[string] $weburl ="Web application URL to the use for upgrading"[string] $wfeSvr01 = "Name of the first Web Front End"[string] $wfeSvr02 ="Name of the Second Web Front End"Array $otherSvrs01="Other servers in your HA farm all 01"Array $otherSvrs02 ="Other servers in your HA farm all 02"[string] $patchFolderUNC ="UNC to copy the upgrade files from"[string] $patchInstallFolder="The folder to place the upgrade files in on remote servers"[bool]$test ="run through script connecting to servers but not actually performing actions"

Gotchas

if you have a folder in the "web server extensions\16\template\layouts" folder that looks like a version number for example 1.2.3.4 it can be deleted when you enable the Side By Side

Tuesday, September 15, 2015

Brief history, a client of mine had workflows created in Nintex on Sharepoint 2010 that did not use Nintex forms. These workflows were ported to SharePoint 2013 with Nintex Forms. After that none of the a “Request review”, “Request data” or a “Request approval” activity would work. The simplest way to recreated the error was to preview the form but you would get the same error if you published and ran the workflow.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.]Nintex.Forms.SharePoint.ApplicationPages.PreviewNintexForm.GetDefaultValuesForWorkflowVariables() +557Nintex.Forms.SharePoint.ApplicationPages.PreviewNintexForm.InitializeData() +846Nintex.Forms.SharePoint.ApplicationPages.PreviewNintexForm.OnInit(EventArgs e) +645System.Web.UI.Control.InitRecursive(Control namingContainer) +186System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2098After "debugging" the Nintex's code I determined that it was using a XML file stored in a hidden SharePoint list. This XML file contained the form as well as the workflow variable definitions. It turns out that earlier versions of Nintex stored blank variables as . The new version stores them as the code did not support the old format.All I had to do was go through all the workflow variables and assign them a single space as the default value and the forms started working again.

Thursday, September 11, 2014

I had a client that wanted all options in a multi-select lookup field to be selected when a new item was created

Then the user could deselect what they did not need, more common to need all. Well it turns out you can't specify the default values for a multi-lookup field.

I came across this post from Bil Simser (thanks) that gave me the ideas for this JavaScript function to select all the possible options in a specific MultiLookupPicker item. The argument is the name of the field you want to select from, there could be more than one on the page.

Tuesday, April 15, 2014

Been quite some time since I posted anything but I could not find any place on the net that talked about getting a SharePoint list using the CSOM and the lists internal/folder name. I finally came up with this kludge using the SPService, but basicly what I am doing is searching the default view URL for the list folder name.

The reason I needed to do this was I had a client request to setup alerts form one list that had URLS that pointed to another list. The alerts really needed to be on the referenced list and not what the user was currently selecting in the list view.

“AllowedInlineDownloadedMimeTypes” is a collection of MIME types. This list
of MIME types does not contain MIME type of Pdf documents by default. It is
important to understand that by adding Pdf MIME type to IIS settings you will
not solve this issue.

Solution
#1 (via User Interface):

The solution is to change Browser File Handling property on Web Application
level. For that you need to be a Farm Administrator. Steps to change Browser
File Handling property:

By default, option is set to Strict when creating a web
application. When set to Strict, a Pdf document (and other file types) can only
be Saved (downloaded), but in Permissive mode, the Pdf document can be opened in
the browser by default (this is a setting you can change. See Document Library
Settings -> Open in the Client).

Limitation
#1:

Once you enabled “Permissive” Browser File Handling, SharePoint will allow
all documents be opened in the browser. Today, there is no “out-of-the-box”
option to allow Permissive option for Pdf documents only.

Monday, May 7, 2012

Recently I had a client that had setup their "My Sites" in the same web application as their default intranet and wanted to move them to a new web application.
I found several posts on how to exporting my sites like this one and migrating My Sites to a new Content Database but none that actually tacked the issue of moving to a new Web Application.
Well this turned out to be easier than I thought.

Create a new Web Application to house the My Sites.Central Admin -> Application Management -> Managed web applications -> Select New from the ribbon. There is no need to create a new site collection since we are going to drop the content database that will be created.