SharePoint 2016 Preview Installation – Step 3 Configure Database Issue

I had trouble on SharePoint Configuration “Step 3 – Configure Database” when installing the SharePoint 2016 Preview on a single developer VM.

Step 3 never completed its processing after running for 8+ hours.

Here’s my work around:

  1. Disable UAC via the registry setting and reboot.
  2. Use the New-SPConfigurationDatabase powershell script to create the configdb.
  3. Run PSConfigUI to let the rest of the configuration operations (4 through 10) complete quickly.

The updated New-SPConfigurationDatabase command has a new mandatory parameter called -localserverrole. I specified “SingleServerFarm” for the server role. The command prompts for the other input parameters.

New-SPConfigurationDatabase finished successfully, but it did take hours to run.

Note: I’m happy with my development VM performance which is due in large part to SSD disk from which it runs.  I recommend this piece of hardware on your SharePoint 2016 development rig.

JavaScript & CSS – Lessons Learned from the Field

In the past year, I’ve been able to work primarily on SharePoint intranet projects – both from the perspective of re-branding an existing site, as well as creating new, branded sites from scratch. These efforts were made much easier through the power of JavaScript and CSS, and they continue to be essential tools for any modern web development project. Here are some of the lessons I learned (sometimes the hard way) while working on projects in the past year:

Use the Right Tool for the Job

My three primary tools were Visual Studio, SharePoint Designer, and Internet Explorer’s F12 Developer Tools. Each has some unique advantages over the others, especially as code editors for viewing CSS and HTML. But I found that for the most part the Internet Explorer Developer Tools were the most indispensable of the three, mainly for its ability to inspect and modify CSS and HTML on the fly. Here, for instance, we can see & modify all the properties in effect on the highlighted section of text:

01

JavaScript & CSS Can Do Anything

While ‘anything’ might be an exaggeration, I did learn that more often than not, there was a solution for even the most complex problems when JavaScript & CSS were used effectively. Both have a large framework of methods and features that seem to meet any need, including dynamic run-time HTML changes. For instance,

· the function setTimeout() can delay the execution of your JavaScript (which can be useful if you’re waiting for something else to load), and

· the jQuery function addClass() can dynamically add a class to an element programmatically at runtime – this is useful if the element you’re referencing doesn’t get generated until runtime.

Internet Explorer 8 is a Pain

Many of my clients have some small subset of users who still need to use Internet Explorer 8, and from a JavaScript/CSS perspective, this continues to be challenge to my intranet projects. Fortunately, there always seems to be a IE8-specific fix that can be applied, and to ease the pain of integrating these one-off fixes, we can use features like conditional CSSRegistration:

https://tommdaly.files.wordpress.com/2012/05/2012-05-01_2256.png

or in-line CSS tags that target certain browsers:

03

The JavaScript & CSS Community is awesome

There are so many bloggers and developers who are actively sharing their expertise, tips, and tricks regarding JavaScript & CSS that, with a quick internet search, you always seem to be able to find the answer you need. And the people behind the frameworks are continuing to build on it, producing libraries like jQuery and others.

InfoPath is Still Alive

In January 2014, Microsoft announced the end of any future updates to InfoPath, with an implication that it might not be included in the next version of SharePoint. A year later, Microsoft has officially confirmed that InfoPath Forms Services will continue to be one of the services included in SharePoint Server 2016, and its inclusion in Office 365 will remain ‘until further notice’. (The InfoPath 2013 desktop application still remains the last version to be released.) They also announced the cancellation of FoSL (Forms on SharePoint Lists), the InfoPath alternative they were developing, which they had announced at SPC2014. This is very relevant to news to the many organizations wondering how to develop forms in SharePoint if there was no more InfoPath.

Recommendations

Based on this latest announcement, we are continuing to advise our clients to consider InfoPath for any forms project for which it is a good fit. Short term projects or agile processes that need rapid forms development make good candidates. With its inclusion in the next version of SharePoint, and Microsoft’s standard 10-year support cycles, InfoPath still has quite a bit of life left in it.

Why use InfoPath?

Even when it was facing extinction last year, it’s important to realize that InfoPath still has a comprehensive and broad set of powerful features that give it an advantage over many of the alternatives. Here are just a few of the features that are sometimes overlooked:

  • Promoted columns
    • Promoted columns represent fields inside the form that have been published into columns in the SharePoint forms library. The classic example of the value of the promoted column is the Expense Report. A manager can view a forms library that lists each report, with a column representing the total expense amount that needs approval, as well as a sum of all totals. Without the promoted column, the manager would have to open each form individually.
  • XML backend
    • InfoPath uses an XML schema behind the scenes to power its forms. For the normal power user, this fact is irrelevant, and should be considered a black box that need not be opened. But for the SharePoint developer who may need to create code to programmatically examine the contents of InfoPath forms, this is a useful fact. The CreateNavigator method, for instance, can be used to grab an instance of the XMLForm object for the current form document as a data source:
      02
  • Workflow integration
    • Part of InfoPath’s value in the creation of no-code solutions in SharePoint lies in its natural integration with SharePoint Workflow. Both InfoPath and SharePoint workflow natively interact with SharePoint columns, and can use them to coordinate with each other regarding the status of the process, relevant data fields, etc. The included Workflow Status column provides a convenient in-line way to see the progress of the associated workflow right from within the form library.
  • Code-behind
    • There are many times when the standard InfoPath features aren’t quite enough. Sometimes we need to apply code behind our forms to programmatically perform certain features. The Developer tab of InfoPath Designer gives us the ability to attach C# or VB code in Visual Studio to our form for just such a purpose, as seen in the simple example below which applies code that runs when the form loads, adding text to a field. We should always, of course, be mindful of the implications of code-behind to our forms deployment process:03
  • Outlook integration
    • Many times, you can interact with a forms process right from Outlook. It can present InfoPath forms embedded into an email message, with the ability to open, fill out, or submit. These forms could be submitted to you via an automated workflow, or could be opened on demand via the New button:
    • 04

It will be interesting to see if organizations will continue to use these powerful features included in InfoPath, given the ever-uncertain future of the product.

SharePoint 2013 Search Results Not Returned – Alternative Access Mappings (AAM)

Worked through a search issue last week.  Hope this post helps to give some guidance.

We had a Default Zone URL called http://foo

It was extended to FBA on the Internet Zone with URL called http://bar

We configured a content source that crawled the Internet Zone, i.e. we crawled http://bar.

Here are the results:

http://foo (Default Zone Url)

  • The search results web part worked correctly when viewed through http://foo
  • The configured Result Query also was honored to help filter results.
  • The search results links resolved as http://foo.

http://bar (Internet Zone Url)

  • The search results web part returned all results when viewed through http://bar
  • The search results links resolved as http://bar.
  • The configured Result Query was NOT honored to help filter results.

We focused first on permissions with no resolution.

Then we started looking at the AAMs role in configuration.

After some initial positive results, we discovered this article explaining the situation: http://blogs.msdn.com/b/sharepoint_strategery/archive/2014/07/08/problems-when-crawling-the-non-default-zone-explained.aspx

Summary: Always crawl the Default Zone’s URL!  DO NOT attempt to crawl any other alternative access mapping URLs.

Variations Not Working After SharePoint 2010 to SharePoint 2013 Upgrade

A customer had a SharePoint 2010 site collection that we upgraded to SharePoint 2013.

The variation pages propagation jobs were set to run every three minutes.

The publish of an existing page in the variation root caused a “Started…Finished” propagation log entry with no information about the child variations:

The publishing of a new page in the variation root showed the “Started…Finished” message, along with the information about the child variation pages:

It turns out that there is a very important hidden property called NotificationMode on the Variation Label page that seems to be set to null during upgrade.

This NotificationMode property needs to:

1.  Have a value for Variations to propagate;

2.  Be set to true on the item in the list that is the root label;

3.  Be set to false on child variations in the list.

Here is the KB article that contains a powershell script to run to fix NotificationMode:  http://support.microsoft.com/kb/2925599

Coercion Failed Error when Running a Workflow from a Document Retention Policy

Recently, I had a client that wanted to create a “document review” workflow that would run if a document had not been modified in the past year. The solution involved creating a simple SharePoint 2010 style workflow that would assign a task to review the document to the reviewer(s) defined in the workflow’s association settings. A document retention policy was created to run the workflow if the document had not been modified in the past year. The workflow worked fine when run manually. However, when the workflow was run from the retention policy it was failing with the error: “Coercion Failed: Input cannot be null for this coercion.”

Workflow-CoercionFailed

As it turns out there is a (minimally documented) web application property called PolicyUseAssocDataAsInitData that controls whether the workflow association properties are passed to the workflow when it is started from a retention policy. This property was introduced with an October 2011 hotfix for SharePoint 2010 (see http://support.microsoft.com/kb/2596584).

After setting this property the workflow ran as expected from the retention policy.

You can enable this property on a web application using the following PowerShell commands:

$webApplication = Get-SPWebApplication http://yoursite.url
$webApplication.Properties[“PolicyUseAssocDataAsInitData”] = ‘true’
$webApplication.Update()

NOTE: After setting the property you need to restart the SharePoint Timer service in order for the change to take effect.

 

March 2013 PU for SharePoint 2013 is available (and mandatory)

For those of you on SharePoint 2013, the March 2013 Public Update is now available with 30+ fixes as well as some performance and stability fixes around search . The good news is the SharePoint Server 2013 update contains the SharePoint Foundation 2013 update as well, so you only need to apply the one update. The bad news is that there is a change in the package configuration that requires you to install this update in order to install any future SharePoint updates.

The following are the KB links for the respective updates:

  • KB 2768000 – SharePoint Foundation 2013
  • KB 2767999 – SharePoint Server 2013
  • KB 2768001 – Project Server 2013

The Full Server Packages for March 2013 PU are available through the following links:

After installing the fixes you need to run the SharePoint 2013 Products Configuration Wizard on each machine in the farm. Additionally, if you are running Search Service Application in the farm, you will need to perform the following:

how-to-install-update-packages-on-a-sharepoint-farm-where-search-component-and-high-availability-search-topologies-are-enabled

For those of you wondering the difference between and Public Update (PU) and a Cumulative Update (CU), a public update is a monthly release of general fixes and security updates applying to all customers where as a cumulative update is a bi-monthly release of specific hotfixes meant to address a specific customer(s) problem. CUs are often rolled into a PU later, as in this case where the February CU is rolled into this March PU.

Jason Condo, MCITP
Principal Consultant, Systems Management and Operations