Monthly Archives: December 2007

Thinking About Commercial Products

I put up a SharePoint Designer extensions project up at CodePlex earlier this year and even though it’s really quite limited in scope, I estimate that it’s been downloaded by 40 to 60 (possibly even 100) companies in just about two months.  That indicates to me that there’s a market for that solution and if I were to successfully commercialize it, that could translate into a goodly amount of beer 🙂

My background is actually much more in product development and I know what is required to bring a top-notch product, as opposed to a CodePlex hobby project, to market.  In my past life, I was responsible for product R&D for all software products.  The difference between then and now is that I’m a consultant now working for an (excellent) consulting firm (Conchango).  Previously, I had an entire company behind me and in front of me, selling and supporting the products we brought to market.  Today, I’d be alone.

I have several product ideas in mind, but I think the easiest would be to create a commercial version of the above-mentioned CodePlex project that uses that as a starting point and extends it further.  My fuzzy off-the-cuff thinking is to charge something like $100 for an unlimited developer license and $500 per production web front end.  I think I would also give away the source code.

If you have thoughts or experiences that you’re willing to share, please leave a comment or email me directly.  I’d like to hear opinions like:

  • Is it all worthwhile?
  • Practical suggestions for marketing, collecting money, distributing.
  • Pricing.
  • Support.
  • Any other comment you’d like to leave.

It’s "easy" to come up with product ideas and to implement them, though many dozens of hours of work are required.  The other stuff is not as easy for me.

</end>

Technorati Tags:

Sunday Morning Funny: “Jesus Must Die”

We bought our first (and only) "luxury" car back when hurricane Floyd nailed the east coast of the U.S.  We got a LOT of rain here in New Jersey and several days passed before life returned to normal.  Just before Floyd struck, we made an offer for a used Volvo 850 GL and after Floyd struck, drove it home.

It was our first car with a CD player.  Like most new car owners, we went a little CD crazy, revived our dormant CD collection and went on long drives just to listen to CD’s in the car.  Like all fads, this passed for us and we ended listening to the same CD over and over again.  In our case, it was Jesus Christ Superstar

One of the (many) brilliant pieces in that rock opera is sung by the establishment religious types, led by Caiaphas, the "High Priest".  They sing their way into deciding how to handle the "Jesus problem" and Caiaphas directs them to the conclusion that "Jesus must die".  The refrain on the song is "Just must die, must die, must die, this Jesus must die".  You hear that refrain a lot in that piece.

At the time, my son was about three years old.  You can probably see where this is going. 

I came home from work one day and my son is in the living room playing with toys and humming to himself.  I’m taking off my jacket, looking through the mail and all my usual walk-in-the-door stuff and I suddenly realize that he’s just saying, not really singing: "Jesus must die, must die, must die."  I was mortified.  I could just see him doing that while on one of his baby play dates at a friend’s house — probably the last play date with that baby friend.

We pulled that CD out of the Volvo after that 🙂

</end>

Technorati Tags: ,

Google Did Accept My Live Spaces Blog Into the AdSense Program

UPDATE: As of 03/09, I have found no way to integrate my live spaces account with Google Adsense.  Microsoft’s system here seems to prevent all of the technical mechanisms that Google provides would-be adsense hosters.  I tend to believe this is mainly a side effect of the security they’ve built into live spaces, not a direct effort to disable Adsense. 

This is not a SharePoint post, but might be of interest to bloggers generally.

Someone commented on their Windows Live Spaces blog that Google affirmatively denied their application to participate in AdSense.  She theorized that Google denied her because Windows Live Spaces hosts her blog. However, I was recently accepted into the program for my live spaces blog, so the policy has either changed or Google denied her for some other reason.

Of course, I don’t see any obvious way to integrate Google AdSense into my live space, but it’s a start 🙂

</end>

Technorati Tags: ,

Implementing Master / Detail Relationships Using Custom Lists

Forum users frequently as questions like this:

> Hello,
>
> Please tell me if there are any possibilities to build a custom list with
> master and detail type (like invoices) without using InfoPath.
>

SharePoint provides some out of the box features that support kinds of business requirements like that.

In general, one links two lists together using a lookup column.  List A contains the invoice header information and list B contains invoice details.

Use additional lists to maintain customer numbers, product numbers, etc.

Use a content query web part (in MOSS only) and/or a data view web part to create merged views of the lists.  SQL Server Reporting Services (SRS) is also available for the reporting side of it.

However, there are some important limitations that will make it difficult to use pure out-of-the-box features for anything that is even moderately complex.  These include:

  • Size of related lookup lists vs. "smartness" of the lookup column type.  A lookup column type presents itself on the UI differently depending on whether you’ve enabled multi-select or not.  In either case, the out-of-the-box control shows all available items from the source list.  If the source list has 1,000 items, that’s going to be a problem.  The lookup control does not page through those items.  Instead, it pulls all of them into the control.  That makes for a very awkward user interface both in terms of data entry and performance.
  • Lookups "pull back" one column of information.  You can never pull back more than one column of information from the source list.  For instance, you cannot select a customer "12345" and display the number as well as the customer’s name and address at the same time.  The lookup only shows the customer number and nothing else.  This makes for an awkward and difficult user interface.
  • No intra-form communication.  I’ve written about this here.  You can’t implement cascading drop-downs, conditionally enable/disable fields, etc. 
  • No cascading deletes or built-in referential integrity.  SharePoint treats custom lists as independent entities and does not allow you to link them to each other in a traditional ERD sense.  For example, SharePoint allows you to create two custom lists, "customer" and "invoice header".  You can create an invoice header that links back to a customer in the customer list.  Then, you can delete the customer from the list.  Out of the box, there is no way to prevent this.  To solve this kind of problem, you would normally use event handlers.

It may seem bleak, but I would still use SharePoint as a starting point for building this kind of functionality.  Though there are gaps between what you need in a solution, SharePoint enables us to fill those gaps using tools such as:

  • Event handlers.  Use them to enforce referential integrity.
  • Custom columns: Create custom column types and use them in lieu of the default lookup column.  Add paging, buffering and AJAX features to make them responsive.
  • BDC.  This MOSS-only feature enables us to query other SharePoint lists with a superior user interface to the usual lookup column.  BDC can also reach out to a back end server application.  Use BDC to avoid replication.  Rather than replicating customer information from a back end ERP system, use BDC instead.  BDC features provide a nice user interface to pull that information directly from the ERP system where it belongs and avoids the hassle of maintaining a replication solution.

    BDC is a MOSS feature (not available in WSS) and is challenging to configure. 

  • ASP.NET web form: Create a full-featured AJAX-enabled form that uses the SharePoint object model and/or web services to leverage SharePoint lists while providing a very responsive user interface.

The last option may feel like you’re starting from scratch, but consider the fact that the SharePoint platform starts you off with the following key features:

  • Security model with maintenance.
  • Menu system with maintenance.
  • "Master table" (i.e. custom lists) with security, built-in maintenance and auditing.
  • Search.
  • Back end integration tools (BDC).

If you start with a new blank project in visual studio, you have a lot of infrastructure and plumbing to build before you get close to what SharePoint offers.

I do believe that Microsoft intends to extend SharePoint in this direction of application development.  It seems like a natural extension to the existing SharePoint base.  Microsoft’s CRM application provides a great deal of extensibility of the types needed to support header/detail application development.  Although those features are in CRM, the technology is obviously available to the SharePoint development team and I expect that it will make its way into the SharePoint product by end of 2008.  If anyone has an knowledge or insight into this, please leave a comment. 

</end>

Quick Tip: Content Query Web Part, Lookup Column Value and XSL

I have a column name in a content type named "Real Estate Location".

That column is of type "lookup".

I have modified <CommonViewFields> and ItemStyle.xsl to show the column.

A simple <xsl:value-of select=…> returns back an internal value that includes ordinal position data, such as:

1;#Miami

To get the human-friendly value, use xsl substring-after, as shown:

<xsl:value-of select="substring-after(@Real_x005F_x0020_Estate_x005F_x0020_Location,’#’)"></xsl:value-of>

Use this technique whenever you are working with lookup values in XSL transforms and need to get the human-friendly value.

<end/>

Technorati Tags: , ,

SharePoint Beagle December Issue Up & Live

Many of you know this already, but the December edition of SharePoint Beagle is live.

Every article is worth reading in my opinion.

I want to give a little extra bump to my colleague’s article (Natalya Voskrensenskya).  She provides a screen-shot extravaganza while describing how she used custom lists, workflow, SharePoint Designer, data views and other elements to implement a self-service training feature in MOSS.  She describes techniques that can be applied in many different business scenarios.  Check out her blog while you’re at it.

Don’t forget to check out my article as well 🙂  I wrote about using MOSS to help an HR department manage open positions.

</end>

MOSS Tells Me “Access Denied” to Edit a Workflow Task, But I Really Do Have Access

I’ve implemented a workflow using SharePoint Designer in a site which is mainly read-only to "NT_AUTHORITY\Authenticated Users" (i.e. everyone).  There is a forms library for an InfoPath form.  There is an associated workflow tasks list as well so that when the workflow operates, it can assign tasks to people.

I break permission for the forms library and task list so that any authenticated user can create forms and update their assigned tasks.

I test with my low-privileges test account. 

Can I fill out and save a form to the library? –> YES

Can I access the task from an email link? –> YES

Can I see an Edit workflow task link –> YES

Can I click on that link?  –> NO … Permission Denied.

Why can I see an edit link that denies me permission when I click on it?  That’s not how it’s supposed to work…

I go through the security configuration again, very closely.  I do it again.  I consider deleting this post because I obviously don’t know anything about security.

Finally, I search the Internets.  I find this highly unlikely MSDN forum thread:  http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1838253&SiteID=17

The posters appear to be suggesting that the simple act of exporting the workflow to a drive platter will fix a MOSS security issue?  I can hardly believe I just typed that.  I’m reminded of the South Park episode about the 9/11 conspiracy where Stan is asking our Preznit, "Really?" over and over again. 

So, nothing to lose, I fire up SPD, right-click on the workflow and save it to my c:\ drive.  That would be the c:\ drive on my laptop.  I’m looking over my shoulder the whole time so that no one will ask me, "why are you saving that workflow to your laptop?"

Incredibly, that solves my problem.  I can edit the task.

I hereby nominate this to be the Most Bizarre Workflow Workaround of 2007.

</end>

Technorati Tags:

SharePoint Designer, Current Item’s “Encoded Absolute URL” and HTTPS

We often want to send an email that includes a hyperlink to the item or document that triggered the workflow.  We can use current item’s "Encoded Absolute URL" for this purpose.  However, it always seems to use "http" for the URL protocol.  If your site runs on HTTPS then it will not work for you.

image

As far as I know, there is no out of the box solution to this problem.  If you need to use HTTPS, you have no out of the box option.

To solve it, create a custom action that provides a string replace function to use in your workflow.  Alternatively, use a 3rd party tool such as the excellent package here: http://www.codeplex.com/spdwfextensions 🙂

</end>

Technorati Tags: ,

Quick and Easy: Determine Internal Column Name of a Site Column

UPDATE: Jeremy Thake has blogged about this and put up some code for a console application that shows internal names.

I was trying to get a content query web part to display a due date from a task and because the screen label is "Due Date", I assumed that the column name to use in <CommonViewFields> is "Due_x0020_Date".

Wrong!

The real column name in this case was "DueDate".

How did I find it?  I re-read Heather Solomon’s blog entry on modifying CQWP to show additional columns of data.  She describes this process at step #13.  Trust it.  It’s correct.  At least, it was correct for me.  I did not trust it at first for another column with a much longer name.

I say "Trust it" because I did not trust it and probably wasted near two hours butting my head up against a wall.  After I resolved the "DueDate" name, I wanted to add another field to <CommonViewFields>.  Using the Solomon technique, I was getting a column name like "XYZ_x0020_Project_x0020_Due_x00".

I thought to myself, that’s clearly a truncated name.  I went ahead and un-truncated it with no success.  I finally used the seemingly truncated name and it worked.

Bonus tip: When I was working with the CQWP, if I added a bad internal name to <CommonViewFields>, the CQWP would tell me that the query had returned no results.  But, if I added a data type to the field name, it would return a result.  Adding the data type actually masked a problem since I was referencing a non-existent field.  I could add it, but when I tried to display its value, I would always get a blank. 

This did not mask the error:

<CommonViewFields>Due_x0020_Date;</CommonViewfields>

This did mask the error:

<CommonViewFields>Due_x0020_Date,DateTime;</CommonViewfields>

</end>

Beware Breaking Changes to ItemStyle.xsl

I was working with ItemStyle.xsl to customize the look of a Content Query Web Part and right about lunch time, I made a breaking change to the xsl.  I didn’t realize it, but this had far reaching effects throughout the site collection.  I went off to lunch and upon my return, noticed this message appearing in a bunch of places:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.

I blamed the client (not realizing as yet that it was my fault at this point) but eventually noticed that visual studio intellisense was warning me that I had malformed XSL.  I corrected it and everything started working.

Be darned careful when working with ItemStyle.xsl (and any of the global XSL files) — breaking them affects many artifacts in the site collection.

<end/>