Archive for the ‘WebPart’ category

Closing (or X’ing) is not Deleting Webparts

August 4, 2009

SharePoint WebPart pages often have ‘Closed’ WebParts being loaded everytime the page loads because the page editor may have incorrectly ‘closed’ a WebPart rather than ‘deleting’ the WebPart. (Or never removes it after closing it.)
close

Everyone who works with SharePoint sees and most likely runs into this (often :().
This is by no means ‘new’. In fact it’s been around since back in the 2003 days and here are a couple good posts that already exist on it:

The point being you can easily fix this for all your pages by adding the ?contents=1 to each page and managing it that way (see linked articles above for description of how this works, or my previous post: https://sharepointkb.wordpress.com/2008/07/25/sharepoint-webpart-error/) or you can add each closed webpart individually (using the advanced webpart pane). The why this is a good thing is pretty straight forward, it provides you with a way to restore webparts just in case you didn’t mean to ‘remove’ them from the page.

The why you should go through ALL of your landing pages, home pages, or often updated pages and do this ‘clean up’ work *regularly* (until it’s no longer an issue) is because it still retrieves these webparts (and all their lovely properties) when it loads the page, it just doesn’t render them to the end user. This makes for much slower response rates and can be easily improved.

So seriously, if you read this and haven’t checked how many closed webparts are on your pages (in the past month) go do that right now and clean them up. Set up a scheduled task each week to do this, write a script, or train people to manage page content so that it doesn’t happen anymore. Do anything but leave it alone. Then tell other people, and make this one of those checks you do when working with pages. You will be surprised by how much it can often help page load times.

Let’s also hope that Microsoft makes these ‘closed’ parts expire in the future… since recycling bin already does this. *nudge nudge* *wink wink* to MS.

Hope this helps,
Richard Harbridge

Commerce Server 2009 and SharePoint (SharePoint E-Commerce)

March 5, 2009

I am sure anyone out there who has dealt with E-Commerce is  aware of Microsoft Commerce Server (if you aren’t check it out).

Way back in 2007 Microsoft released a nice white paper describing the integration between MOSS 2007 and Commerce Server 2007 (can be found here: http://www.microsoft.com/downloads/details.aspx?FamilyId=2AEB1A5E-43B8-483B-8CB2-86C0E82BF0AB&displaylang=en). There was a lot of feedback and requests for more integration options (especially with the explosive growth of SharePoint because it’s so totally awesome).

Well as many who saw the PDC presentation (http://channel9.msdn.com/pdc2008/PC59/) on the new “Mojave” or Commerce Server 2009 server product there are quite a few important changes that have been made to the product. Along with the completely redone API there are also a considerable number of web parts (and all their source code) that are now available.

What this gives us a fully-featured, out-of-the-box e-commerce shopping site in SharePoint.

The available Web Parts fall into these categories:

Catalog

  • Images Viewer Web Part – Display different product, catalog, or other images.
  • Product Details Web Part – Displays the different products and product details on a product pages.
  • Product Query Web Part – Displays the products and variants, usually based on a catalog, that a shopper is looking for.
  • Site Map – Displays the map of your site.

Management

  • Channel Configuration* – This feature is a SharePoint list that provides the ability to assign a "channel name" to the site that has been created. A channel is any Web site that is targeted to a specific segment or device. The channel name is used throughout Commerce Server 2009 so that business and presentation logic can be tailored to address the specific needs of that channel.
  • Inline Product Editor Web Part – Provides marketers and merchandisers with the ability to update specific product information on the site directly, so that they can see the changes instantaneously, in a what-you-see-is-what-you-get (WYSIWYG) experience. This allows for quick edits in descriptions and titles, or any other attribute information. These changes are reflected back to the master catalog within Commerce Server 2009.
  • Product Provider Web Part – This is a utility Web Part, meaning that users will use it indirectly as part of other Web Parts, and is used by various other Web Parts to marshal data calls to Commerce Server and return product information.
  • Simple Property List Web Part – This is a utility Web Part, meaning that users will use it indirectly as part of other Web Parts, and it is used to enable the selection of various properties from the Commerce Server Core Systems.

Marketing

  • Discount Ad Web Part – Displays advertisements and discounts that are relevant to both the current shopper and current site context. This Web Part works in conjunction with Marketing Manager and the various campaigns that are set up.
  • Reviews and Ratings – List Web Part and Reviews and Rating – Average Rating Web Part – Displays the reviews and ratings for individual products. These Web Parts also let shoppers submit their own review and rating, with administrative workflow for management discretion.
  • Store Locator – Integrates with Microsoft Live Virtual Earth so that the shopping site has detailed maps of store locations, enabling shoppers to find the store quickly.

Orders

  • Add to Cart Web Part – Enables shoppers to add products to their cart.
  • Checkout Web Part – Manages the checkout process. It is responsible for the flow of checkout operations, providing a uniform navigation model. This checkout process may include address and credit card management actions.
  • MiniCart Web Part– Displays a summary, usually in the upper-right corner of the page, of the total items and amount in a shopper’s basket.
  • My Wish Lists Web Part – Provides shoppers with a way to manage all of their lists.
  • Order Details Web Part – Displays a read-only version of the shopping cart and checkout information.
  • Order History Web Part – Displays previous completed orders, including order status.
  • Shopping Cart Web Part – Displays all of the merchandise that the shoppers want to purchase.
  • Wish List Detail Web Part – Displays the details of a shopper’s list

Profile Administration

  • Address Book Web Part – Provides the interface to view and start address administrative tasks.
  • Address Detail Web Part – Provides the management functionality, such as adding and editing addresses.
  • Change Password Web Part and Forgot Password Web Part – Provides functionality for shoppers to reset or change their account password.
  • Credit Card Details Web Part – Provides the management functionality, such as adding a credit card and credit card information.
  • Credit Cards Web Part – Provides the interface to view and start credit card administrative tasks.
  • Live ID* – Provides functionality to associate shopper accounts with their Microsoft Live ID account, so that the shopper can associate their Live ID account to a particular shopping site.
  • My Profile Web Part – Provides the management functionality for account profile information.
  • Registration Web Part – Provides the functionality to let shoppers register on an e-commerce site.

Search

  • Search Box Web Part – Displays a search box that can be configured to search both the e-commerce site and any static content.
  • Search Paging Web Part and Search Results Web Part – Displays the results of the search in a two-column pane, allowing shoppers to easily see what’s on your site, and easily page through a large number of results.

* These two items are technically not Web Parts, but they use SharePoint controls and are available in the Default site or can be integrated into other sites.

If you are looking for more information on the webparts and how to work with them I recommend reading up on it here: http://msdn.microsoft.com/en-us/library/dd451458.aspx
Every one of the web parts/controls I listed above is outlined in this section of MSDN with an explanation as to how to work with it. 🙂

Another REALLY important thing to note is the fact that the full source code for these parts is available in the SDK (http://www.microsoft.com/downloads/details.aspx?FamilyID=4baddaf1-bd01-4131-bbbb-2e7db80b60d4&displaylang=en) for commerce server 2009. That’s right, you can use these as a foundation for creating your own, or extend them because all the code is available.

Hope you are as excited as I am about the new integration and web parts Microsoft is releasing along with the sizable advancements in product design (and in this case developer extensibility with the new API in Commerce Server),
Richard Harbridge

P.S – Also found this video interesting (answers some other questions): http://mfile.akamai.com/14853/wmv/microsofttec.download.akamai.com/14853/TechEdOnline/Videos/457_low.asx

InfoPath Webpart – Host InfoPath Templates in WebPartPages – Free

February 12, 2009

First of all why? If for nothing else there are products that are sold out there that literally cost hundreds of dollars that do exactly what I am going to describe in this post (and in some cases have extra limitations).

If you want to host an InfoPath form template embedded in a SharePoint webpart page it is a fairly easy process and I noticed a few glitches or extra steps in the articles I found on this so I figured I would iterate my own perspective.

There is a webpart  included in the Enterprise version of Microsoft Office SharePoint Server. The webpart is called the XmlFormView: http://msdn.microsoft.com/en-us/library/microsoft.office.infopath.server.controls.xmlformview.aspx. It is powerful, simple, and relatively easy to use. However it is not in the webpart gallery by default there are a few steps you need to do to enable this nice little webpart in your SharePoint web application and then the targeted site collection.

Step One – Modify the Web.Config:

The first step is to modify the web.config file with an extra safe control entry. (Web.config files are stored typically in “C:\Inetpub\wwwroot\wss\VirtualDirectories\PORT NUMBER  or host header name” (Back up the web.config first if you want, but this is a pretty safe change.) The entry you are going to add is shown below and goes in the <SafeControls> section (in case you didn’t guess that :P):

<SafeControl Assembly=“Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” Namespace=”Microsoft.Office.InfoPath.Server.Controls” TypeName=”*” Safe=”True” />

NOTE BEFORE YOU COPY – WordPress messes with my ” characters I think, so make sure you either type this out personally, or at least check it before copying and pasting into your web.config (otherwise you’ll get a server error.)

Save the web.config file after you change it and load up the target site collection in a browser.

Step Two – Make the WebPart Available For Use:

Access Site Settings for the root of the site collection.

sitesettings

Select the WebPart’s Gallery.

webpartssitesettings

Click New.

xmlwebpartnew

Find the Microsoft.Office.InfoPath.Server.Controls.XmlFormView. Select the checkbox beside it and click the populate Gallery button.

xmlformwebpartadd

Step Three (Optional) – Change the WebPart Details:

Now let’s change the webpart’s properties because the name isn’t very helpful (XmlFormView).

xmleditwebpart

Just put in whatever details you want. This is also where you should probably set this webpart up so that only certain groups can add it who have the training and knowledge to do so.

xmlwebpartupdate

Step Four – Add the WebPart to a Page and Configure It:

Now all we have to do is navigate to a page and add the webpart. Simply click the gold add webpart band on the target page when in edit mode and scroll down to the webpart we added (and renamed :)).

xmladdwebpart

After clicking Add you will recieve an error. Don’t worry about it, just hit close. The webpart will show on the page like so.

xmlwebpartclosed

Modify it’s properties and add the following three important things:

  1. Change the EditingStatus to Edited or Init (as desired) since Closed probably isn’t what you want.
  2. Set the XSNLocation to wherever your xsn form is being stored. In my example here I have deployed it to a form libary called Library.
  3. Set the save location for where the form should save to. In my example I actually have the option DisableSave in there so this isn’t necessary (since I am saying to disable the ability to save from this part). Remember your xsn’s submission rules normally dictate where the form will be saved and stored.

xmlformviewproperties

And voila the form should display like you always wanted.

xmlformviewerinpage1

Step Six – After Effects:

Tell your boss you just saved the company several hundred dollars and did an amazing job.

Hope this helps someone out there (and doesn’t offend any of the ISV/product companies who do something like this),
Richard Harbridge

List Web Part for Dynamics CRM 4

December 18, 2008

Great news from the Microsoft Dynamics Team and anyone who uses Dynamics with SharePoint. They have just released their List Web Part for Microsoft Dynamics CRM 4.0 (FREE) which provides all sorts of wonderful features that help you display CRM data inside a SharePoint page.

This isn’t a new component, but the new features are pretty sweet. Here is a summary of the new enhancements:

  1. Multi-tenancy : Allows to choose the CRM organization to view data from
  2. Supports CRM Internet-facing deployment
  3. Supports SSL configurations
  4. Supports both 32-bit and 64-bit environments
  5. Editing of CRM Server URL : You can now edit CRM server url at anytime
  6. Ability to open the current view in CRM to perform additional actions in CRM such as running reports, Quick Campaigns.
  7. Supports personalized SharePoint pages
  8. Enhanced Field-Field connections between two CRM List Web Parts. Subscriber CRM List Web part would automatically filter data by matching provider’s GUID with all attributes of type provider, making it very easy to establish connections like Accounts – Opportunities
  9. Supports Row-Row connection with 3rd party web parts
  10. Supports SharePoint solution deployment ( useful in server farms ) and UnInstall
  11. Will soon be available in all 25 languages supported by CRM 4.0.

Download it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=3B6EB884-EC15-4288-A2A3-D0B47E057458&DisplayLang=en

If you want information on how to use it here is a good reference: http://www.microsoft.com/dynamics/crm/using/deploy/crmwebpart.mspx

Big thank you to the Microsoft Dynamics Team for this update,
Richard Harbridge

SharePoint Content Query WebPart (Customizable, Powerful, and Invaluable to ANYONE who uses SharePoint)

July 25, 2008

Out of the box SharePoint provides ANYONE with almost everything you could possibly need to present SharePoint data (list items, documents, you name it..) onto a webpage. Whether you have an intranet, extranet, and/or internet SharePoint deployment one of the single most important webparts will be the SharePoint Content Query WebPart.

Not sure what it is? Basically (very generalized description) it allows you to roll up SharePoint data into a customizable presentation. Read more here: http://office.microsoft.com/en-us/sharepointdesigner/HA101741341033.aspx

What this really means is two things:

  1. You can roll up pretty much any kind of “query” you can think of for SharePoint data. I could roll up all the policy documents throughout the entire site collection into one page for everyone to see, or maybe roll up the latest 5 news articles and present them to the viewer.
  2. You can CUSTOMIZE the look and feel VERY easily. This can allow some normal list data that looks like a listing of information to be INTERACTIVE for a user, or to look and feel exactly how you want it to!

The second point there is extremely important for those who are using it for internet sites. Want your news articles to roll up on your homepage and show just a thumbnail, title and description? Easy as pie! What if those news articles are all over the site, and are made by many different kinds of users? As long as you structured the data (used content types or something) you can just “Query” it with the content query webpart and voila it will appear.

Now for the part many people miss: But it doesn’t look the way I want it to, and all the options still don’t make it look the way I want.

No problem! If you have anyone who can do basic HTML you should be able to pull it off. (XSL skills are probably a good thing for anything more advanced than minor changes.)

The Content Query WebPart runs off of XSL!
Microsoft released wonderful documentation on how to modify it here: http://msdn.microsoft.com/en-us/library/bb447557.aspx

But as always I will try and provide my own little example to help anyone who hasn’t caught on yet.

  1. Add a content query webpart to a page.
  2. Here is what mine looked like:
    Take a look at the drop down for item style, what I am going to take you through is how to make your own new item style, completely customizing the LOOK and FEEL for how my data items are displayed.
  3. Navigate to the site collection root and visit the StyleLibrary. Within this library is a folder called XSL Style Sheets. We are going to modify one of the files in here called ItemStyle.
  4. You can modify it in notepad, or in visual studio or some other XML/XSL editor. For this demo I will be using visual studio.
  5. Either write your own new template using the others as a guide OR copy one of them as a starting point. In this case we will just copy the “TitleOnly” template and paste it below.Notice that we change the NAME and MATCH of the template we copied. This is what it will show up in the drop down as, and how it will associate the styles and xsl you adjust in the actual content query webpart.
  6. Add some HTML or adjust the XSL as desired. In this sample I just added an image that will appear to the left of each title.
  7. Save and check the XSL change in.
  8. Open the content query webpart you added in step 1 and cause the item style drop down to display.

    You will notice our new template shows up.
  9. Click OK or Apply and VOILA – Customized Presentation (in my case an image of myself showing to the left of each item. Narcissistic I know.)

I hope you all see the power of this WebPart and use it to save you tons of time and effort,
Richard Harbridge

P.S – I highly recommend downloading and trying this solution on a development environment: http://ecqwp.codeplex.com/ which is basically a content query webpart enhanced with more properties pushed up to the user. It also has some other slick features, but basically makes the above steps far simpler to execute and adjust.

— UPDATE: This is a codeplex project, so there are some issues, specifically when dealing with non root site collections. I am advising this as something to start from 🙂 —