InfoPath – Shorten url for browser based forms

In the world of InfoPath, you may have noticed the the url for an open form is crazy big!  I ran into a problem in the past when I ran out of space in the url.  Sometimes this happens if the form is nested a couple of levels down in a site.  Whenever you open a new form in the browser, your url will look like the following:

https://www.yoursite.com/depts/test/_layouts/15/FormServer.aspx?XsnLocation=
https://www.yoursite.com/depts/test/newhiresur/Forms/template.xsn&SaveLocation
=https%3A%2F%2Fwww%2Eyoursite%2Ecom%2Fdepts%2Ftest%2Fnewhiresur
&ClientInstalled=true&DefaultItemOpen=1&Source=https%3A%2F%2Fwww%2
Eyoursite%2Ecom%2Fdepts%2Ftest%2Fnewhiresur%2FForms%2FAll
Items%2Easpx

You can shorten the above by removing all of the items in bold.  It will look like this once you have finished:

https://www.yoursite.com/depts/test/_layouts/15/FormServer.aspx?XsnLocation=
/depts/test/newhiresur/Forms/template.xsn&SaveLocation=%2Fdepts%2Ftest%
2Fnewhiresur&ClientInstalled=true&DefaultItemOpen=1

As a best practice, I do this each time I have to setup a link to an InfoPath form.   This way, I keep my urls short and will not have any issues of running out of url space.

 

Stay Salty!

 

InfoPath form library tries adding new documents instead of opening form

Our current migration from MOSS to SP2013 has been interesting, needless to say.  Because I am an administrator I never see these little issues.  This is one of the latest fires I had to put out.  This popped up for different users whenever they would click on new document.   At first, I thought it was s permission issue, but that was not it.

ie8 and infopath

Turns out that this is an issue with Internet Explorer 8 (of course).  The new document +  calls a javascript function that ie8 cannot recognize.  Instead of opening the web based InfoPath form, it tries to add a document.  After testing on other systems using ie9 +, Firefox, and Chrome this is the only logical explanation.

To address this issue, I had to add a Page Viewer web part to a page and link to the opened view of the form.  Not the most elegant approach, but it works.

Stay Salty!

SharePoint 2013 site in Read only

Have you ever seen this pop up at the top of your screen in 2013?

readonly

This was just one more thing to pop up during our migration from MOSS 2007 to 2013.  Fortunately, this is not a big deal.  Here is a link to another post explaining how to clear this message and remove the locks on your site.

http://blogs.msdn.com/b/spses/archive/2013/05/16/sharepoint-2013-site-in-read-only-mode-after-an-interrupted-backup.aspx

Turns out that a backup process was kicked off this morning and was not complete when we rebooted the farm.  This left us with this nice little pink bar at the top of certain sites.  Phew!  Not a crisis, just too much migration action.

Stay Salty!

Highlight a list/library line item

I blogged on this a while back using a similar approach for MOSS 2007.  Here is a link to that post: http://saltypc.com/?p=99

Things have changed since then so here are the steps to set this up in 2013.

You will need to reference jquery for this to work.  I prefer to download the minified script and place it in a centralized location inside my farm.

  1. Add a script editor web part to the bottom of your page.
  2. Insert the following into your source:

Modify the Change Me to reflect the column name of your list/library.  You can also change the color to any web safe color of your choice.

To highlight mulitple column choices, simply copy the $Text line and past it below the copied line.

Example:

$Text = $(“td.ms-cellstyle.ms-vb2:contains(‘Column A)”); $Text.parent().css(“background-color”, “#FFFFFF”);

$Text = $(“td.ms-cellstyle.ms-vb2:contains(‘Column B)”); $Text.parent().css(“background-color”, “#000000”);

This comes in handy when you need to find a needle in a haystack.

 

Stay Salty!

Hiding the left nav or all navigation in SharePoint 2013

Sometimes, you will find the need to hide the left nav on a page in one of your sites.  You could always click the focus on content button, but then you have to unclick to reset for any other page you browse to.

Hiding the left nav took a little more work in MOSS 2007.  You would have to open SharePoint Designer and remove a couple of lines of code.  Well, not anymore!

To accomplish this, go to your page and edit it.  Add a Script Editor web part to any zone on your page.  Add the following script to the web part:

Click Ok, and you’re done!  Now, if you notice, the left margin properties are set to 0px.  You may want to increase to 5px or 10px so that your page is not eating the left hand side of your monitor 🙂

If you want to hide all navigation from your page, use this script instead:

Stay Salty!