Tuesday, May 2, 2017

Opening a form as a Site Member gives: "Sorry, you don't have access to this page"

Symptom: 
You have a SharePoint list and the user reporting the issue is a Site Member. When the user tries to open a list item in view mode they are redirected to a page with the message: "Sorry, you don't have access to this page"

Issue: 
The issue I had was that one of the fields in the list was a person field. This field restricted the choice of people to a SharePoint Group. On checking this SharePoint security group. I found that the setting for this group "Who can view the membership of the group" was set to "Group Members".

Resolution:
Once I changed the "Who can view the membership of the group" to "Everyone" everything worked as expected.

Tuesday, April 25, 2017

Nintex Forms: Birthday Date Picker Year

Issue: By default the date picker will display the years as ±10 years. This is not suitable for a Date of Birth date picker. 

Fix:


  1. Edit the form in Nintex Forms.
  2. Double click the Date picker field.
  3. Open up the "Advanced" section.
  4. For setting "Store Client ID in JavaScript variable" change to "Yes".
  5. An additional field will be visible called "Client ID JavaScript variable name". Provide it a name. In my example it's called "birthdayControl".
  6. Click Save. Dialog will close.
  7. Click "NINTEX FORMS" on the ribbon.
  8. Click "Settings"
  9. Open up the "Custom JavaScript" section of the "Settings - Form" dialog.
  10. Add the following:
    NWF$(document).ready(function(){
          NWF$('#'+birthdayControl).datepicker('option',{yearRange:'-80:-0'});
    });
  11. Change the variables to suit your situation:
    1. birthdayControl: Client ID Variable set in step 5 above.
    2. -80: How many years back you want to display in the date picker.
    3. -0:How many years forward you want to display in the date picker.
  12. Click "Save". Dialog will close.
  13. Publish the form.
  14. Your specific date control should now show a more appropriate year selection for Date of Birth.

Tuesday, July 5, 2016

SharePoint 2013: Internet Information Services is not installed?

Symptoms:
While attempting to run the "SharePoint Products Configuration Wizard" for SharePoint 2013. You get a dialog which states:
"Internet Information Services is not installed. You must have Internet Information Services installed in order to use the SharePoint Products Configuration Wizard."
But your sure IIS is installed.

Issue:
Some IIS dependent services might not be running.

Fix:
Open up the Services Management Console (Press the Windows key. Then start typing Services. Open "Services")
Ensure the following services are running:
IIS Admin Service
World Wide Web Publishing Service

Sunday, August 9, 2015

Android Google widget: Searching just apps on the phone/device

Long version:
I recently upgraded from a Nexus 5 to a Samsung Galaxy S6. One thing that bugged me from this change was the way the Google search widget behaved. The Nexus 5 would present content on the device as quick results as you type the search phrase. This is what I used to quickly find apps and open them. On the S6 it would search the web, music, contacts, books and apps.

Short version:
To configure the Google search gadget to present apps as quick results:
Open up the apps tray.
Open up the Google folder and/or find "Google Settings".
Open up "Search & Now".
Open up "Phone Search".
Now you can select what the Google gadget searches.

I've only got "Apps" and "Contacts" selected. But it's up to you how you use this widget

Monday, February 3, 2014

SharePoint 2013: "Sorry, we're having trouble reaching the server"

Trying to add users to SharePoint groups.

When I type in a name I get the following message: "Sorry, we're having trouble reaching the server"

I had been tinkering with the web app directly in IIS (don't try this at home) and I disabled "Anonymous access". 

Apparently this is necessary for SharePoint to function. So don't mess with it.

Wednesday, November 20, 2013

SharePoint field + XML = Blank field

Intro:
I've been tasked with storing the contents of an RSS feed (xml) to SharePoint via a Custom Timer Job.

When I tried to run the following code. I simply got a blank field for the "RSSContents" field of the new item.

using (System.Net.WebClient client = new System.Net.WebClient())
{
using (Stream data = client.OpenRead("http://www.bom.gov.au/fwo/IDZ00059.warnings_vic.xml"))
{
using (StreamReader reader = new StreamReader(data))
{
    SPWebApplication webApp = this.Parent as SPWebApplication;
    SPList list = webApp.Sites[0].RootWeb.Lists["TimerTest"];
    SPListItem newListItem = list.Items.Add();
    newListItem["Title"] = DateTime.Now.ToString();
    string s = reader.ReadToEnd();
    newListItem["RSSContents"] = s;
    newListItem.Update();
}
}
}

Workaround:
Add HtmlEncode into the mix:
using (System.Net.WebClient client = new System.Net.WebClient())
{
using (Stream data = client.OpenRead("http://www.bom.gov.au/fwo/IDZ00059.warnings_vic.xml"))
{
using (StreamReader reader = new StreamReader(data))
{
    SPWebApplication webApp = this.Parent as SPWebApplication;
    SPList list = webApp.Sites[0].RootWeb.Lists["TimerTest"];
    SPListItem newListItem = list.Items.Add();
    newListItem["Title"] = DateTime.Now.ToString();
    string s = reader.ReadToEnd();
    s = WebUtility.HtmlEncode(s);
    newListItem["RSSContents"] = s;
    newListItem.Update();
}
}
}

I'm working in a SharePoint 2013 environment. So your results may vary. But I suspect this is the same across each of the different SharePoint versions. 

How to: Debug a timer job deployment?

Intro:
So I've been tasked with writing a Custom SharePoint timer job.
So I googled it up and I followed Andrew Connell's article
http://www.andrewconnell.com/Creating-Custom-SharePoint-Timer-Jobs

Symptoms:
After I made modifications to suit my needs I go and try to deploy it (by pressing F5). After which I get a very descriptive message:
Error occurred in deployment step 'Activate Features': Object reference not set to an instance of an object.
So I comment out every line of the "Activate Features" code and try to diagnose it. Breakpoints don't seem to work.

Workaround/Resolution:
Insert
System.Diagnostics.Debugger.Launch();
into your code and if all goes right Visual Studio will pick up the task of debugging your code.