|
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
|
|
|
|
Date Math with InfoPath |
| | Ranked
4.7
out of 5. Rate This Post! | | | | | |
The enterprise edition of SharePoint provides a powerful Forms interface called InfoPath Forms Services. This utility allows you to build electronic Forms which can be filled out, saved, and printed without leaving the browser. As is common with most Forms, where InfoPath is no exception, a certain degree of formatting is required to put the values in the Form into a business context. Conditional Formatting in InfoPath allows Form developers to meet the needs of their business users through highlighting, color-coding, and hiding (or showing) Form controls. With plain-text this is very easy, as it is with numbers as well. What do you do when you need to flag a text box in red because the date value has passed today's date? But InfoPath Forms Services loads SharePoint date fields as strings; this doesn't seem very helpful. So let's get creative.
Using a simple formula which I thought up while working on a Business Intelligence project, you can easily split a date into its individual components: Year, Month, and Day. Using these components you can create an integer representation of the date which can then be used by InfoPath's Conditional Formatting rules:
( YEAR * 10,000 ) + ( MONTH * 100 ) + DAY
If we apply this to today's date, we get:
( 2010 * 10,000 ) + ( 3 * 100 ) + 7 = 20,100,000 + 300 + 7 = 20,100,307
Using this formula, yesterday will always be less than today, tomorrow will always be greater than today, and today will always be equal to today. The important thing to mention here is: we can do this without code-behind. Code-behind severely complicates deployment; I have built wildly massive and complicated Forms implementing oodles of business rules, but I have never once used code-behind.<... | | | | Custom SharePoint Master Page Feature with WSP Builder |
| | Ranked
4.7
out of 5. Rate This Post! | | | | | |
One of SharePoint’s most prominent strengths lies in the fact that users can easily customize their own experience. In the case of master pages however, they can be a bit complicated for an end user to deploy and change. Custom master pages sometimes contain dependant image folders and also require administrator approval before they can be used. However by bundling the master page for a SharePoint site into a feature, usability is enhanced greatly. Not only will the feature bypass the administrator approval step and push all relevant files onto SharePoint with a click of a button, but by activating the feature, the master page will instantly be set. Furthermore, by deactivating the feature the master page will automatically revert to default.
Recently I encountered a situation where I had to programmatically set a master page through code in a programmatically provisioned site collection. I wasn’t able to find a comprehensive guide on how to create such a feature, especially when the master page also requires that an images folder be pushed to the root of the site collection, so I wanted to share my knowledge with the rest of the SharePoint community. In this post I will describe how to create a Site Collection level feature that will push the master page file as well as all other relevant files into the SharePoint site and set the master page. I found Paul Stork’s blog (http://mindsharpblogs.com/PaulS/archive/2007/06/18/1903.aspx) very helpful when coding this feature.
... | | | | How to Quickly Deploy and Activate a Timer Service to Your Site Collection |
| | Ranked
4.8
out of 5. Rate This Post! | | | | | |
Introduction:
SharePoint is an amazing medium for information management because of the variety of custom services that are supported. It is famous for its web services and workflows, but custom code can also be used in timer services and event handlers. Unfortunately, since these features are not utilized very frequently, documentation for them can be difficult to find.
Today, I’d like to talk about quickly deploying a timer service into SharePoint. Timer services, as their name implies, are useful for performing programmatic tasks at regular, periodical intervals. For example, suppose at the end of each week, you would like to migrate the contents of a single Library into other categorical libraries based on the content’s metadata. This would be a perfect opportunity to develop a timer service and impress your boss/client/friends.
Timer services run in the farm level, so they are a little trickier to activate than workflows or event handlers. To deploy and activate a timer service, you should use Visual Studio 2k8 and WSPBuilder. WSPBuilder is a free product which will immensely facilitate your SharePoint programming endeavors. You can download it from here. Also note that installing WSPBuilder onto Visual Studios 2k8 will require you to have SP1 for Visual Studios 2k8 already installed on your machine. While we will use the WSPBuilder to create a solution for SharePoint, we will be using stsadm to deploy and activate the solution to SharePoint.
Creating the Project:
Hopefully you have installed WSPBuilder by now. Afterwards, run Visual Studio 2k8 and go down to the WSPBuilder ... | | | | Public Facing Masterpage Techniques |
| | Ranked
4.7
out of 5. Rate This Post! | | | | | |
Everyone knows that SharePoint is a great platform for Intranets. But more and more people are starting to use it for its excellent Web Content Management features. When using SharePoint to create a public facing site, the typical strategy is to approach it as a vanilla ASP .NET Application. However, there are certain techniques that I have learned over the years which have helped me incorporate that balance between traditional ASP .NET and the out of the box SharePoint feature set. I would like to highlight 3 of those techniques below.
Datasheet View Background Color
Many websites tend to have a solid background color, which usually has a CSS class like Body { background-color: Some Color; } in their HTML. One thing you may have noticed is that whatever color you set as your background is the color that your datasheet view will take on. So if you are using a color other than white, especially a dark shade, this makes the Datasheet quite unreadable and very difficult to use. The way I fix this is with a short snippet of Javascript on my Master Page. The basic idea is we are reading the URL of the site into a variable. When viewing Datasheet mode, SharePoint appends the String "ShowInGrid" to your query string. If the URL contains this string we output a Style tag and set the background to white. Just make sure you put this Javascript further down in your HTML than your main CSS links. This is because browsers process style in order of sequence. Here is code snippet:
<script type="text/javascript">
fullURL = parent.document.URL
var bodyfix = "<style type=\"text/css\">.body{ background-color:#FFFFFF; }</style>";
if (fullURL.indexOf("ShowInGrid")!=-1)
document.write(bodyfix);
... | | | | 7 Tools for SharePoint Developers |
| | Ranked
4.8
out of 5. Rate This Post! | | | | | |
SharePoint 2007 is a pretty amazing product which does a lot of things out of the box. Sometimes however, the capabilities you are looking for are not part of the product and you need to do a little custom development. If you have tried to do this yourself, you may know that there are some gaps in the overall developer experience. As a consultant, I'm often asked what tools and utilities I use to create and deploy solutions. In this article I list a number of 3rd party and community tools which I have found to be very useful.
Windows SharePoint Services 3.0 Tools: Visual Studio 2008 Extensions, Version 1.2
To some extent, Microsoft has been dragging its feet in respect to development tooling for SharePoint. SharePoint has always been notoriously painful to develop for in comparison to the F5 to debug approach of ASP.Net and Windows Forms development.
Enter the Visual Studio 2008 Extensions for WSS 1.2. These extension add support for developing and debugging common SharePoint customizations such as site definitions and web parts. These tools are far from seamless but they do provide a path towards a more graceful development and debugging experience. The 1.2 version of the tools just came out in June and they support Visual Studio 2008. The word on the street is that the next version of these tools are going to be vastly improved and provide much more integrated (or at least a less kludgy) way to develop for SharePoint. I can't tell you how much I'm looking forward to it.
CodeRush
CodeRush is a Visual Studio Add-In developed by Devexpress. The tool provides a means to write common and repetitive code using a ver... | | | | Mail Enabled Lists vs. The Missing Windows 2008 POP3/IMAP Server |
| | Ranked
4.0
out of 5. Rate This Post! | | | | | |
I have been faced with a number of situations where I am asked to develop functionality related to mail enabled lists in SharePoint. Mail enabled lists are exactly what they sound like. They are lists which can be configured with an e-mail address so that users can add items by e-mailing the address designated to the list. For example, let's say I set up an announcement list and I gave it the address announcements@xyx.com, I could just write an e-mail to that address and that the body and subject line of the email would become a new announcement. You can't just make ANY list e-mail enabled in SharePoint. It has to be one of the following types:
- Document, picture, or form library
- Announcements list
- Calendar list
- Discussion board
- Blog
Specific information on how to set this up can be found here. This is all very cool functionality to be sure, however there is one major catch. This catch is that you need have to have an e-mail infrastructure in place to be able to get this to work. For most production environments this means Microsoft Exchange. On a test environment this is generally something less involved, like setting up the SMTP and IMAP/POP3 services that are included as part of Windows 2003 Server.
Recently, I upgraded my development VM to use Windows 2008 Server. I did this because I wanted to become familiar with the new OS as I would imagine I'm going to be seeing a lot more 2008 production environments as time moves forward. So, I set up this really sweet Windows 2008 VM. It had everything. It was a domain controller, It had SQL Server, it had MOSS 2007, I set up reporting services (in integrated mode mind you). I had a separate virtual host set up in IIS for deploying WCF web services. I had Visual Studio 2008 and the new 1.2 version of the Visual Studio Extensions for SharePoint loaded up.
Things seemed to work really well until I needed to configure email enabled lists. As it turns out, Microsoft decided to discontinue the IMAP & POP3 component. This puts a big damper on reading any e-mail generated by SharePoint. Furthermore... | | | | Opening SharePoint Links in a new window |
| | Ranked
4.3
out of 5. Rate This Post! | | | | | |
Many of us have seen the Links List in SharePoint. It is a widely used list type for intranets, extranets and internet facing sites not only for its simplicity but also for it's built in ability to reorder items. This is done by clicking on the Change Order link in the actions menu, and it is also accompanied with a great UI. This is a wonderful feature that custom lists and libraries unfortunately do not have out of the box.
Alas as great as the links library may be with all its Re-Ordering goodness, that shall not be the theme of this post. Oh no, even with all the work the brilliant SharePoint engineers in Redmond had put into this list type, it seems they dropped the ball on one glaringly obvious feature. As many of us have seen, one of the really annoying quirks is the lack of an "Open In new window" option. What I am referring to is when you add the links list as a web part to a page, clicking on a link navigates away from the SharePoint site instead of opening it up in a new window or tab. Now us computer savvy of course know the work around to this "Just tell the user to hold down the ctrl key". Unfortunately this does not fly with many end users, or customers. Now believe me I was a skeptic when it came to the urgency of this feature. On one of our recent projects our project manager had warned from the beginning this would be a huge deal, but I just brushed it off. Until of course we started receiving user feedback after the beta release. And low and behold the majority of the complaints didn't have anything do with Workflows or InfoPaths or any of that other nonsense. It was about that freakin Link List not opening in a new window! So then I was sold. Now the question becomes how do we accomplish this in SharePoint? Well the solution I came up with is by using a DataForm web part in SharePoint designer. You start by going to the task panes menu and activating the Data Source Library.
Then with the data source library open, click on the Links list you are interested in and click show data.
Now you are ready to create your dataform webpart. This is done by selecting the fields you want and then clicking Insert Selected Fields as "Multiple Item View". Since all... | | | | | | | | | | | |
|
|
|
|
|
|
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
|
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
| Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | FileType | xsn | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.2 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.3 | 255 | | Edit in Browser | /_layouts/images/icxddoc.gif | /_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser | 0x0 | 0x1 | ProgId | InfoPath.Document.4 | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsx | 255 | | View in Web Browser | /_layouts/images/ichtmxls.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=1 | 0x0 | 0x1 | FileType | xlsb | 255 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsx | 256 | | Snapshot in Excel | /_layouts/images/ewr134.gif | /_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=1 | 0x0 | 0x1 | FileType | xlsb | 256 |
|
|
|
|
|