Archive for March, 2016

Quickly Build a Multi-Server SharePoint 2013 Developer Environment (Part 5) – AutoSPInstaller Answer File

In part five of my building a multi-server SharePoint dev environment series we are going to install SharePoint 2013. But first I am going to cover how to create the AutoSPInstaller Answer File. We will do this using the AutoSPInstaller online tool. There isn’t a lot of information out there on it (that I could find) so I hope it is helpful. I am going to go through each area in pretty decent detail, but to make things easier for you, I will also provide my answer file that you can easily modify for your needs. Once we have finished creating the answer file I will show you how to kick off the install of SharePoint.

Posts in this series:

 

Read more

Quickly Build a Multi-Server SharePoint 2013 Developer Environment (Part 4) – Preparing SharePoint Servers

Welcome to part four of my series on how to “Quickly Build a Multi-Server SharePoint 2013 Developer Environment”.  In this section I am going discuss how to configure SharePoint servers and prepare our last two VMs.  We’ll be using a series of tools to accomplish this, including AutoSPSourceBuilder and AutoSPInstaller (which if you followed the prep from part two you already have downloaded and ready to go).  The other thing we are going to do that has been different than the steps done so far is we are going to configure both SP servers and then install SharePoint and configure the farm all at once.  To do this we will be using the remote installation option that AutoSPInstaller gives us.

Posts in this series:

Read more

Make Hidden SharePoint Fields Visible Again

There are times when you set a field to visible (optional or required) in the GUI, yet it refuses to show up on the list\library.  This seems to occur if your content type inherits from a parent that has the field hidden.  If you attempt to make the child content type field visible again it doesn’t seem to cascade down into the list instance of the content type and thus your field never shows up on the list.

So you think, “ok, I’ll just use PowerShell”.  You’re on the right track, but there is more to it than meets the eye.

if you run the following code:

$spWeb = Get-SPWeb "http://teams.drevdevsp2013.com";
$spList = $spWeb.Lists["My Documents"];
$spField = $spList.Fields["Keywords"]
$spField.Hidden=$false;

You are going to get the following error message:

Exception setting “Hidden”: “Cannot change Hidden attribute for this field”

ErrorMessage

What you don’t realize is that when this particular problem occurs, there is an internal field that you can see in the field xml, but is not part of the regular properties called CanToggleHidden.  As it sounds, the purpose of this field is to ensure the field can’t be enabled.

But wait!!  There’s hope.

There’s a method that can be used called SetFieldBoolValue.  It allows us to modify that value.  If you do a little research on it, the method is listed in technet.  But it’s one of those: “It’s there but you shouldn’t use it” kind of methods.  Well in this case we have to use it.  The only way to get to it is via the Reflection namespace as follows:

$spWeb = Get-SPWeb "http://teams.drevdevsp2013.com";
$spList = $spWeb.Lists["My Documents"];
$spField = $spList.Fields["Keywords"]
$fieldType = $spField.GetType();

#Access the "hands off method" via reflection namespace
$hiddenMethod = $fieldType.GetMethod("SetFieldBoolValue",
    [System.Reflection.BindingFlags]$([System.Reflection.BindingFlags]::NonPublic -bor
    [System.Reflection.BindingFlags]::Instance));

#update the can toggle field using our newly aquired method
$hiddenMethod.Invoke($spField, @("CanToggleHidden",$true));

#Now that the hidden toggle is open we can make the field to visible
$spField.Hidden=$false;
$spField.Update();

Once you have completed the script you will find your field is visible again.

Thanks for reading!

Playing Outside Your Sandbox Slide Deck

This weekend I had the privilege of speaking at the SharePoint Saturday Conference in Vancouver.  At the conference I spoke on no code solutions for SharePoint Business Connectivity Services and the different features you had access to out of the box.  It was a great experience and one I hope to repeat in the future.  This presentation seems quite popular as I will be giving it again at the SharePoint Saturday in Calgary and the Prairie Developers Conference in Winnipeg.

As promised for all of these sessions I have attached the slide deck here for you to download for reference.

Playing outside your sandbox

Thanks for reading.

Quickly Build a Multi-Server SharePoint 2013 Developer Environment (Part 3) – Configure SP SQL Server

As I had stated in part 1 of this series, I was reviewing Vlad Catrinescu’s series on creating a dev environment quickly and effortlessly. I think it’s a great post, but it is a single server environment and I wanted to setup a multi-server farm. That is what brought me to create this series. My first post has the architecture of the build if you are starting here and want to review. I also suggest you review the second part of the series as it contains the prep steps I outlined in the first post as well to prepare you for the steps in this post (it’s also important as we deploy your Active Directory and DNS there).  In this post we will Configure the SP SQL Server.

Posts in this series:

Read more