Speaking at SharePoint Saturday Connecticut, Nov 8th

I am very pleased to share that I’m speaking at SharePoint Saturday in Connecticut, on November 8th! More details: http://www.spsevents.org/city/ct/ct2014

In my session we’ll be disussiong Using SharePoint Online for your web site, it’s more than just SharePoint. Using SharePoint Online is a great idea for most companies in need of a web site. SPO provides a lot of capabilities and can be setup relatively easy. However, your web site is more than SharePoint, more than something hosted on a server, it is something that needs your legitimate attention around search engine optimization, multi-browser support, mobilility and performance. David will walk through additional considerations, after you have your SPO site setup, that you need to know to have a successful web site on your Office 365 tenant.

These events are awesome, completely free, and where you can learn a ton! I highly recommend attending if you can make it! Hope to see you there!

About these ads

It’s the most mo-some time of the year

Coming this weekend, the fantastic month of November and great mustachery begins!

I did this last year as well, and as I enter my second round of mo-someness, I can’t wait! My wife still isn’t happy with it, but it’s for a good cause. So please help make sure my soup strainer doesn’t grow in vain, and my wife understands it’s really for a good cause and donate!

You can donate to me or to my team, the Super Slalom Mo Bros, representing the Boston office.


Super Slalom Mo Bros

My page is here: http://mobro.co/davidlozzi. If you’re a Facebook friend, you can expect many selfies again this year, and as I said last year, for each day I receive a donation, I won’t be posting a selfie. So again, help me help you, and spare you from the horror.

SharePoint: Hiding Ribbon and More with IsDlg

SharePoint has this neat little feature on every page that allows you to hide the header and nav on the page by simply appending isdlg=1 to the end (careful, it’s case sensitive). It comes in handy when you’re using a page viewer web part, you can show another page on your page and hide the other stuff that you already have on the page. Huh?

It does this:

A normal, happy, SharePoint page

Normal Document

Adding isdlg=1 to the URL makes it look like this

Document library page with isdlg

As you can see we lost the header and quick launch, which is great, but we still have a ribbon! GAH, let’s get rid of it!

This use case came out of a StackExchange question. The user only wanted to show the list of documents in a page viewer web part.

Easy enough! With a little jQuery, we can hide the ribbon, and other stuff on the page. Here’s the code to hide the ribbon bar:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<script type="text/javascript">


function hideItAll(){
 if(window.location.search.toLowerCase().indexOf("isdlg=1") > 0){
 $("#s4-ribbonrow").hide(); //ribbon bar

What the above does is check if the isdlg=1 flag is in the URL, and if it is, hide the ribbon bar.

So you get something like:

Hiding Ribbon Bar

Ooooo…. what about that other bar, with the new, upload, sync? Let’s hide that too. Update your script like:

function hideItAll(){
 if(window.location.search.toLowerCase().indexOf("isdlg=1") > 0){
 $("#s4-ribbonrow").hide(); //ribbon bar
 //because the bar joins us late in the game, we need to throw CSS in to hide it
 $("head").append("<style>#Hero-WPQ2 { display:none }</style>");

will look something like:

Hide Ribbon using IsDlg

And let’s go crazy and hide that pesky view and search bar:

function hideItAll(){
 if(window.location.search.toLowerCase().indexOf("isdlg=1") &gt; 0){
 $("#s4-ribbonrow").hide(); //ribbon bar
 //because the bar joins us late in the game, we need to throw CSS in to hide it
 $("head").append("&lt;style&gt;#Hero-WPQ2 { display:none }&lt;/style&gt;");
 $("#CSRListViewControlDivWPQ2").hide(); //views and search bar


Hide toolbars and ribbon with isdlg

You can further explore and show/hide other page components as you want, find the element’s ID using your toolbar and have fun!

‘Til next time, happy SharePointing!

Why you should keep your on premise SharePoint when developing for Office 365

Office 365

If you’re diving into the wonderful world of developing for Office 365, or SharePoint Online, don’t let go of your development environment just yet!

Keeping your on premise instance of SharePoint 2013 for development will make a few things much easier, and will alleviate headaches in the long run.

For starters, make sure to have your environment configured with host named site collection, not separate web apps. This closely mimics how Office 365 is configured, and will help down the road. See this TechNet article for more details.


You heard it here first, Office 365 will error on you!

If you kept your on premises SharePoint, you can try the same app there, and if it errors, look through the logs. If it does not error, wait out Office 365 (more below).

I ran into this exact issue when developing a provider hosted app. Just couldn’t get past the error on Office 365. I spun up my virtual environment, tried it there, and received the same error. Searched the logs and found that my client ID wasn’t correct. Oops, I fat fingered something. Fixed and reran on Office 365 and success!

This won’t always work, as Office 365 does get updated more frequently than your environment does, and some of those updates may cause issues. Test it on your on-prem and then Open an Issue with Microsoft (more below).

You can also check the error log with your app, if you’re lucky. More on that here.

Waiting for Office 365

Sadly, Office 365 isn’t the best thing since sliced bread. Sometimes, Microsoft and team will randomly perform maintenance, and it appears whenever they want. I was working through the aforementioned provider hosted app, when all of a sudden, everything went read-only:

Site is read only Office 365

Great, now what?! Nothing. I couldn’t do anything, but my deadline kept getting closer!

What is a SharePointer to do? Dive into your on premise environment which you were wise enough to save, and finish development there. This read-only status kept for about 6 hours this day. This can really hurt development progress when this happens.

Another fun thing is when services get degraded.

Office 365 degraded SharePoint Online

This issue came up, and hindered one specific piece of what we were developing, sorry I forget what it is exactly. Sure enough, moving to on-premises saved the day.

One more story: I was working happily in Office 365 all day, with a deadline the next day, things were going smoothly. I left work at 5p, knowing I’d sneak in a little more work that night to polish up the app. I get home, enjoy my family time, and jump online once my kids are in bed. Sure enough, Office 365 is experiencing an issue and wouldn’t let me continue… grrr… Got up early the next morning and things started working again (I was able to meet my deadline).

Open an Issue with Microsoft

I have to hand it to Microsoft, their support team for Office 365 is responsive! Submit a support request through your tenant. If you’re working on someone else’s tenant, it’s okay, submit the request using your details. Gone are the days of having to submit under an account user just to hand the ticket off to someone else.

Once submitted, they call me back within 4 hours most times. Not too shabby. They aren’t the brightest set of support techs, sometimes things get escalated, but they really try hard to fix your issues.

Again, if you have your on-prem environment, you can submit the support request, then continue working on-prem.

Less Important, Until You Lose it

Office 365 is on the cloud, and if you lose your internet, you’re down. This may go for your on premises SharePoint as well if it’s not running locally on your workstation. Nothing hinders work more than not being able to access anything! Keep it mind.

Keep Your On Premises SharePoint

Just do it.

SharePoint Online’s Public Website Doesn’t Allow Users to View Display Forms

If you’re used to SharePoint, and the display form on lists, you may be thinking you can use that on your SharePoint Online Public Sites as well. Sadly, by default your anonymous users cannot access the display form of a list item. Instead, SharePoint Online prompts the user to login.

Annoying? Yes.

It is due to the ViewFormPagesLockdown feature, which is available in SharePoint on-prem, and appears to be on by default on SharePoint Online. I think the reasoning is that the display form can have more data on it than you’d care to share to your visitors, and frankly, the page is rather dull. So thinking through how to get around this, my initial thoughts were:

  • Disable this silly feature, but alas, you can’t.
  • Use the search web parts with a custom display template, but alas, these aren’t available on the public site #FAIL
  • Write some custom JavaScript to grab the data, meh, too much work.
  • Fudge a few columns, and the view, and get it to work. BING BING BING

We can use the views of a list, since users can access that fine, and manipulate it to look like a form page.

Below I walk through how we did it on the Boston Office 365 User Group site, www.bostono365usergroup.com,

Take the default view of the list:

Boring SharePoint List View

Then let’s change the view style, we used Newsletter, which gives us the nice start to where we want to be:

List view in Office 365 SharePoint

Not terrible right? But let’s make it a wee bit more prettier. I edited the page, added a code snippet web part (embed code) and threw in the following collection of CSS:

<style unselectable="on">
.ms-listviewtable tr td.ms-vb2:first-child {

.ms-listviewtable td:first-child+td, .ms-listviewtable td:first-child+td+td {

.ms-vh2 {

table.ms-listviewtable tr td.ms-vb2:first-child {

.registerButton {
padding:4px 5px;
border:1px solid #5b5b5b;

@media screen and (max-width: 400px) {
.ms-listviewtable td:first-child+td, .ms-listviewtable td:first-child+td+td {
.ms-vb-tall {

Much better right? Almost looks like a normal content page now ;)

SharePoint List View Customized

How do we get users to this page view now? If I had multiple items in the list it would just scroll long. Since this is a list view, we can filter the list view by the ID of the item.

We added a calculated column to use as a link on the home page. So, let’s add the column and the calculation:

=CONCATENATE("<div><a href='/events?FilterField1=Title&FilterValue1=",Title,"'>",Title,"</a></div>")

Make sure to set the Calculated Field to output as Number. Why didn’t I use ID you might ask, well, the ID field doesn’t work as you’d like. The ID isn’t calculated until after the item is added and the calculated column doesn’t get updated accordingly. Very annoying. Fortunately, in our case the title will suffice.

So the above calculation will output a link, sending the user to the events list view, filtered based on the current item. You can see it in action on the home page:

SHarePoint Event List on Office 365

Wait a second, what’s that nifty Register button?


That’s another calculated column, reading from the registration URL field, and then spits out some extra HTML for us to format it as needed (in conjunction with the above CSS):

=IF(RegistrationURL="","coming soon",IF(RegistrationURL<>"",CONCATENATE("<div><a id='regLink' class='registerButton' href=",RegistrationURL," target=_blank>Register</a></div>")))

It’s not impossible to have nice looking forms on the public site in your Office 365 tenant, but does take a little extra work.

Til next time, happy SharePointing!