Monday, April 14, 2008

SharePoint Alerts—Activesync Synchronization Issues?


I got a new toy about three weeks ago...an AT&T Tilt. A.K.A. the HTC 8925, the Tilt runs Windows Mobile 6 and is my first portable device on which I will receive email. Okay, so I'm a bit late jumping into the whole mobile email thing. I've never thought of email (or me) as being important enough to have to have in front of me 24x7. So now I have it. I'll let you know later if that's good…or bad.


Learning curve engaged. I had to figure out this Activesync thing. You know, like Active X and Active desktop and Active Directory and Active bladder…but I digress (too many of those commercials on TV). Back to Activesync. Got the Activesync thing figured out pretty easily. My biggest problem was entering my "secure" password on the keyboard to set up my OWA Exchange account correctly. Things were rockin' and rollin' and mail was downloadin' until…


…about a week into it. Suddenly, my device stopped syncing. Well, partially, anyway. Seemed like it developed a distaste for my email. However, it was still syncing my contacts, calendar and tasks without a problem. Kinda' like Powerpoint, it started sucking the life right out of me as I began my troubleshooting journey. I did all the standard Windows Mobile things…delete the account and start over, soft reset, hard reset and finally, upgrading the ROM (I originally thought the upgrade had fixed the problem).


I found several articles that talked about a problem with corrupt emails causing Activesync to stop synchronizing emails. The question for me was how to determine which of my gazillion emails might be causing the problem. I removed all my emails from my Inbox (it needed a good housecleaning, anyway). I even tried moving entire folders into my PST to no avail. Still, no sync. It was all very interesting, as the error I had originally received suddenly went away and I was left with an errorless, non-syncing mailbox.


Well, someone else in the company (thanks, Eric) started having problems and determined quickly that it might be caused by a SharePoint alert! Must be a better Googler than I. Okay, now THAT makes sense. I've seen those SharePoint alerts in the past that won't open correctly in Outlook, so I thought it sounded plausible. Sure enough, I deleted my daily alerts from my Inbox and volia, I was syncing again.


I went back and tested the scenario by forcing a SharePoint immediate alert. Sure enough, as soon as I got the alert in my Inbox, my email stopped syncing with Activesync. Follow-up provided me with article 937788 from Microsoft which seems to shed more light on the issue. I've requested the hotfix to see if it really fixes the issue.


We all love SharePoint alerts, but they appear to have some undesirable side effects. I'm pretty sure I'm not the only one who has had (or is having) this issue. I've seen other posts with similar issues. I found out quickly that losing your portable email can lead to withdrawl!

Saturday, April 12, 2008

When Good Web Parts Go Bad


Here's a quick tip for a Saturday morning.

At some point it's bound to happen. You'll mess up a perfectly good SharePoint page by incorrectly configuring a web part. You may add some incorrect custom HTML, JavaScript, or style sheet code to a Content Editor Web Part, and then not be able to edit or close the web part. Or you may add a page viewer web part to frame an external web page and the webmaster controlling that external page writes some code to break it out of frames.

When this happens, you need some way to close the offending web part. To do this, go to the Edit Properties page for the page that contains the bad web part. If you scroll to the bottom of Edit Properties page, you will see a link to Open WebPart Page in maintenance view. Click on this link.

From the Web Part Page Maintenance page, you can select the web part you messed up and then either Close it, Reset it, or Delete it.

Ah! You're back in business!

Wednesday, March 26, 2008

Close Individual SharePoint Blog Posts for Comments


In a recent Extreme Makeover class, a student asked how they could close a Post in a SharePoint blog site for comments. They still wanted users to be able to read the blog post and read existing comments, but they didn't want them to be able to post comments on it. Kevin Pine and I worked together to create the following solution using some JavaScript in a Content Editor Web Part on the Posts.aspx page.

Add a Custom Column to the Posts List to Allow Comments

We needed some way for the blog owners to indicate when a post had been closed. On the Posts list, we added a new column named Allow Comments. We set the Type as Yes/No (check box) and the Default Value to Yes.

Update the Posts.aspx Page to Show the Value of the Allow Comments Column

Users can only submit comments while reading an individual post. This view of a blog post is generated by the Posts/Posts.aspx page. I clicked on the title of one of my blog posts to view the post in this page.

The Post Footer is displayed at the bottom of the post and above the comments section.

We needed the value of our new Allow Comments field to show up in the Post Footer. To accomplish this, we edited the current view by doing the following:

  1. Click on Site Actions, Edit Page.
  2. On the Posts web part, click on edit, Modify Shared Web Part.
  3. In the task pane, click on Edit the current view.

  4. Check the box beside Allow Comments, and click OK.

  5. View the blog post again and notice that the Allowed Comments value is now visible in the Post Footer.

Add the JavaScript to Hide the New Comment Fields If the Post is Closed for Comments

The form to submit new comments only appears on the Posts/Posts.aspx page. This means that we can add some JavaScript to this page to hide it if the phrase Allow Comments: No appears in that bottom line. Here is what we did to get the JavaScript on the page.

  1. While viewing a post in the Posts/Posts.aspx page, click on Site Actions, Edit Page.
  2. In the Right Web Part Zone, click on Add a Web Part.
  3. Select the Content Editor Web Part.
  4. Click the link to open the tool pane.
  5. Click on the Source Editor button.
  6. Paste in the following JavaScript code and click the Save button. Note that the code is fairly well commented if you are interested in what it is actually doing.

    <script language="JavaScript">
    //add an entry to the _spBodyOnLoadFunctionNames array

    //so that our function will run on the pageLoad event

    _spBodyOnLoadFunctionNames.push("hideComments");


    function hideComments() {

    //Create an array to store all elements to which

    //the ms-PstFooter class have been applied

    var PostFooterArray = getElementsByClass('ms-PostFooter');


    //Check to see if the first element of the array contains

    //the text "Allow Comments: No"

    if(PostFooterArray[0].innerHTML.indexOf('Allow Comments: No')!= -1){

    //create an array to store the SPAN tag with the ID of part1

    var commentSPAN = document.getElementById("part1");

    //Replace the comment form controls with my own HTML statement

    commentSPAN.innerHTML = '<b>Comments have been closed on this post.</b>';

    }

    }


    function getElementsByClass(theClass) {

    //From: http://www.seandempsey.com/code/getElementsByClass.php

    var allPageTags = new Array();

    //Populate the array with all the page tags

    allPageTags=document.getElementsByTagName("*");

    var Elements = new Array();

    //Cycle through the tags

    var n = 0;

    for (i=0; i<allPageTags.length; i++) {

    //Pick out the tags with our class name

    if (allPageTags[i].className==theClass) {

    Elements[n] = allPageTags[i];

    n++;

    }

    }

    return Elements;

    }

    </script>

  7. In the tool pane, expand the Appearance section.
  8. Set the Chrome Type to None.
  9. Click OK to close the tool pane.
  10. Click Exit Edit Mode.

Testing the Solution

My first blog post had the check box for the Allow Comments field checked. I can see the fields to post a comment.

If I uncheck the Allow Comments field and view the post, I can see that the comments have been closed.


Sunday, March 16, 2008

Changing Host Header for the MySite Host


I was playing around with SharePoint on my virtual machine and had set up a new installation of MOSS when I noticed I had entered a host header incorrectly (at least incorrectly from the standpoint of being consistent with my previous installations). I entered "MySite" instead of "MySites" as the first part of the host header. I know, I know, it's probably more correct to use the singular, but I was trying to be consistent with what others had done.
All I wanted to do was to change the host header and have SharePoint recognize the change. I performed the standard internet search and didn't get instant gratification, so I started playing around. I found that making the changes in three places and an IISRESET seemed to take care of my problem.
First, in Central Administration under Operations, Global Configuration, Alternate access mappings, edit the internal URL.


Next, open up IIS Manager and select the properties of the MySites web app. Change the host header by clicking on the Advanced… button.


Again in Central Administration, navigate to the Shared Services provider and click on My Site settings in the User Profiles and My Sites section. Change the personal site provider URL.


Perform an IISRESET. All should be well.

Monday, March 10, 2008

Get a Virtual PC image with SharePoint Solutions software pre-installed


Now you can download a Virtual PC hard drive image (VHD) with a forms-based SharePoint Extranet AND our entire software product line already installed and pre-configured for your evaluation. This downloadable virtual hard-drive image is pre-installed with:


  • SHAREPOINT SOLUTIONS EXTRANET COLLABORATION MANAGER
  • SHAREPOINT SOLUTIONS SITE PROVISIONING ASSISTANT
  • SHAREPOINT SOLUTIONS ALERT MANAGER 2007
  • MICROSOFT WINDOWS SERVER 2003 R2 ENTERPRISE EDITION
  • MICROSOFT SQL SERVER 2005 ENTERPRISE EDITION
  • SERVICE PACK 1 FOR MICROSOFT SQL SERVER 2005
  • MICROSOFT OFFICE PROFESSIONAL 2007
  • MICROSOFT OFFICE SHAREPOINT DESIGNER 2007
  • MICROSOFT WINDOWS SHAREPOINT SERVICES 3.0
  • MICROSOFT OFFICE SHAREPOINT SERVER 2007
  • MICROSOFT .NET FRAMEWORK 2.0
  • MICROSOFT .NET FRAMEWORK 3.0

The VHD evaluation images are designed to last for 30 days from the date the virtual machine is first run. After 30 days the image and all the software on the image will expire. Free registration is required for download.

Tuesday, March 04, 2008

Update from Microsoft SharePoint Conference 2008


By all accounts, Microsoft SharePoint Conference 2008 is a resounding success. There seems to be a lot of enthusiasm from both attendees and exhibitors alike.

Here's a photo of our SharePoint Solutions' booth:




Our session yesterday on SharePoint Extranets and FBA was standing-room-only. Here's a photo of myself presenting:

Monday, March 03, 2008

SharePoint and Office 14: Looks like I may have guessed right for once


For once, it looks like I may have guessed correctly about some enhancements we can expect in the next version of Microsoft SharePoint and Office: Office 14.

Three weeks ago, I was the keynote speaker at the SharePoint Information Worker Conference 2008. In my keynote, I gave my best guess at some of the enhancements we might see in the next version of SharePoint (expected sometime in late 2009).

Today, while listening to Bill Gates' Keynote address at the Microsoft SharePoint Conference in Seattle, I was pleasantly surprised to hear that I may have guessed right on my #1 prediction.

Gates said that a top priority for the next version of SharePoint is to beef up SharePoint Lists. SharePoint's List features don't sound as sexy and appealing as some of its other features, such as BI and the Business Data Catalog, but Lists are really the bedrock of the product and have proven to be a breath of fresh air to information workers who previously had to rely on Excel spreadsheets and Access databases for their seemingly endless need for tracking applications.

Unfortunately, so far SharePoint's List features have not been robust enough to develop true database applications. Fundamental features that application developers have come to expect in a relational database management system have been absent so far in SharePoint Lists due to a layer of architecture between SharePoint Lists and the underlying DBMS, SQL Server.

As I understood Gates today, that is all going to change in the next version of SharePoint. In the next version, SQL Server will "understand" SharePoint Lists and it will be possible to create a List that will, in effect, create a native table in the SQL Server database. Furthermore, because it is native, this will allow developers to make use of the more robust features of the DBMS and will eliminate the current performance issues with SharePoint Lists that have over 2000 rows.

In my mind, this improvement will also open the door for thousands of ISVs to port their vertical market applications to SharePoint as a platform, if they choose to do so.

I think this is great news for SharePoint as a development platform.

Friday, February 22, 2008

Hope to see you at Microsoft SharePoint Conference 2008


Well, it has kind of snuck-up on me, but we’re only about a week away from Microsoft SharePoint Conference 2008!

If you are going to make it over to Seattle for SPC2008, we hope that you’ll stop by our booth and take a moment to say hello. Our SharePoint Solutions’ booth number at SPC2008 is #810, right next to the meal area ;). We’ve gone big for SPC2008, with a voluminous 20x20 space and a brand new booth to boot! We’ll be giving away a few Zunes, so please come by and register to win.

Along with Jeff Cate and Jeremy Luerkens, I will be presenting a session at SPC2008. Our session is titled “Collaborating with Customers on the Extranet with SharePoint 2007: Solutions and Best Practices”, and is a 200 level presentation in the Collaboration and Social Computing track. Here’s the session description:

Come to this session to hear about using Windows SharePoint Services and Microsoft Office SharePoint Server on the Extranet, from the foremost experts on the subject. This session presents a case study of an extranet deployment at a company that has a need to create numerous extranet sites per month for customers and manage accounts for over 1500 extranet users and growing. This session covers the details of forms-based authentication and alternate authentication stores—which are the two primary extranet-enabling features included in WSS and MOSS. Then, we dive deep into the best-of-breed add-on, Extranet Collaboration Manager for SharePoint 2007, to see how it rounds out SharePoint's native functionality to provide a truly complete solution that is secure and manageable. Don't miss this session if you are planning to deploy SharePoint on the Extranet!

If you have time after hours, I’ll be grabbing a pint with the bunch over at Kells Irish Pub on Wednesday night.

Hope to see you there!

Thursday, February 21, 2008

Has Microsoft Redefined the Order of Operations in Workflow Designer?


We were recently reviewing the content for a new InfoPath workflow course (Mission: Automation) here at SharePoint Solutions when it was brought to my attention that the Workflow Designer in SharePoint Designer appears to have redefined the order of operations for Boolean expressions.

If you take a look at the conditions in the Workflow Designer for a simple case where we're creating a condition on the title field, you'll notice we have the Boolean expression:

title field contains "meeting" OR title field contains "lunch" AND title field contains "manager"

I learned the order of operations as BNAO (brackets, not, and, or). Since there are no brackets or parenthesis in the user interface, I can only assume that the correct way to interpret this condition expression is:

(title field contains "lunch" AND title field contains "manager") OR (title field contains "meeting")




However, when you do the testing within SharePoint, you find the order of operations interpreted within Workflow Designer as:

(title field contains "meeting" OR title field contains "lunch") AND (title field contains "manager")

as indicated by the results in the following screen shot. The "completed" workflows represent the cases where the Boolean expression evaluated as false and the "in progress" workflows represent the cases where the Boolean expression evaluated as true.




Somebody help me here! Has Microsoft redefined how Boolean expressions are evaluated or am I missing something about the way the expression is displayed that should cause me to adjust my perspective?

Monday, February 18, 2008

Integrating Community Server with SharePoint


Since Community Server™ was first released, SharePoint™ administrators and users have looked towards its rich forums and blogging functionality with envy. Even with the latest release of SharePoint, its built-in discussion and blog capabilities have been a disappointment to all but the least demanding users. The scalable, feature-rich forums and flexible blogging functionality of Community Server are what users really want.

Our engineers here at SharePoint Solutions have spent some time and effort coming up with the standard work and best practices to make these two excellent products integrate well together. The end result for our customers is a best-of-both-worlds scenario with a seamless user experience. Both applications recognize the same user account, without any additional login required.

As an example, our SharePoint-based commercial software site uses the out-of-the-box Blue Band master page. By creating a custom master page for Community Server, we've skinned the forums to match the software site's look-and-feel. As you can see, the result is visually consistent and convenient with only a single user login required.

SharePoint Solutions now offers a professional service to integrate Community Server with your SharePoint implementation. If you would like Community Server's excellent forums and blog capabilities integrated with SharePoint, please contact us to have our expert team assist you.