My 2p about ERP Solutions, Information Worker Solutions and other software products (mainly Microsoft Dynamics AX and Microsoft SharePoint).

25 September 2008

How to trigger a workflow based on a non-empty Comments field?

At an installation where I created a helpdesk functionality based on the Help Desk template, one of the Application Templates for Windows SharePoint Services 3.0, I was asked to create a workflow which sends out an email automatically when a comments is added to a service request. The email may not be sent out if the comments added was empty.
I thought this wouldn't cause much of a problem and started creating the workflow with Microsoft Office SharePoint Designer 2007. The condition checked to evaluate if an email should be sent out was If Comments is not empty.


I created a service request, next edited it and entered a value for the Comments column. I received an email triggered by my workflow for this change, which was expected. I edited the same service request again, without entering a value for the Comments column. I received an email triggered by my workflow, which I didn't expected, as my Comments added was empty. I edited the service request again, entering a value for the Comments column, resulting in the expected reception of an email.


So apparently, the Comments column wasn't empty, even if you didn't enter a value for it upon editing the service request. I thought this had something to do with the fact that the Comments field was a Multiple lines of text type of information field with the property Append Changes to Existing Text set to Yes. But I had no idea why the workflow reacted on each change of a service request as if the Comments field wasn't empty. So I created another workflow which copied the value of the Comments field into another field. This other field had as type of information Single line of Text. I immediately understood why the workflow sent out an email each time: apparently there are <div> tags placed around each Comments field change. Not entering a value for the Comments field, nevertheless resulted in a value of <div></div>. So I changed my workflow to take this into account, and hey, no mails were sent out anymore if the end-user edited a service request without entering a value for the Comments field.


Continue reading......

by Patrik Luca 7 comments

24 September 2008

7 crucial points to check upon document conversion failure

Problems which may arise with document conversion


Microsoft Office SharePoint Server 2007 includes document-to-Web page conversion utilities that can convert Microsoft Office Word 2007 documents (with and without macros) into standard Web pages that can be published to an internal or external Web site.

Some problems or difficulties may arise though while setting or trying to use this document conversion functionality:

  • While converting a Microsoft Office Word 2007 document, you receive following error: Converting the document to a page failed. The converter framework returned the following error: CE_OTHER.
  • The Convert Document option is not available in the contextual menu for a document stored in a SharePoint Document Library.


7 crucial points to check


If you run into these difficulties, I recommend to run through underneath checklist to verify if everything is set up as it should.
  • Go yo SharePoint Central Administration -> Application Management -> Document conversions (under the External Service Connections section) and verify if document conversions is enabled for the Web Application and if there is a Load Balancer Server defined.
  • Check in Administrative Tool -> Services if the Office Document Conversion Launcher Service is running and is running under the Local System account.
  • Check in Administrative Tool -> Services if the Office Document Conversions Load Balancer Service is running and is running under the Local Service account.
  • Check if Microsoft Office SharePoint Server 2007 is not installed on a domain controller: document conversion is not supported in such a configuration (you could have this problem if you are trying out some stuff on a local VPC for example).
  • Check if the Microsoft Word document is saved in the 2007 version (extension .docx). The document conversion won't work for Microsoft Word documents saved in a previous version.
  • Check if the publishing features are enabled for the SharePoint site on which you try to use the document conversion functionality.
  • Verify the configuration of the content type of your Microsoft Word document: it should be configured properly for document conversion. (Manage document conversion for this content type).

If you have other checks to perform, feel free to post them as comment to this blogpost.

Some interesting resources around the SharePoint document conversion functionality:


Continue reading......

by Patrik Luca 2 comments

18 September 2008

Getting rid of logon prompts when opening Office documents

Problem description: You are prompted to enter your credentials each time you open a Microsoft Office document stored in a SharePoint document library


Each time you open a Microsoft Office document, you are prompted to enter your credentials again, even if you check the box remember my password. For non Microsoft Office documents, such as PDF files, you are not prompted to enter your credentials. The credentials prompt is not taken into account apparently: if you choose Cancel in the prompted window without entering your credentials, the Microsoft Office document is still opened.

Solution: Modify the registry


There is a fix for Microsoft Vista: you should have service pack 1 installed of Microsoft Vista as the hotfix is automatically included in service pack 1.
The next step is to modify your registry as described in the Microsoft KB You are prompted to enter your credentials when you access an FQDN site by using a Windows Vista-based client computer that has no proxy configured.


Continue reading......

by Patrik Luca 2 comments

01 September 2008

Setting the trust level for newly installed Web Parts

Problem description: Request for the permission of type 'Microsoft.SharePoint.Security.
SharePointPermission, Microsoft.SharePoint.Security, Version=1


After installing a new SharePoint Web Part, it is not working and you get an error like Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.

Solution: Change the trust level for your SharePoint Web Part


This means the trust level of your newly installed SharePoint Web Part is not set correctly. To fix this, follow these steps:
  1. Start the Visual Studio Command Prompt (in the program group Visual Studio Tools).
  2. Go to the directory where the dll is installed (typically c:\Inetpub\wwwroot\wss\VirtualDirectories\80\bin).
  3. Run the command gacutil /i newwebpartdll.dll.
  4. Run iisreset.


Your newly installed SharePoint Web Part will be added to the global assembly cache (GAC) and everything should work fine now.


Continue reading......

by Patrik Luca 2 comments

20 August 2008

Bulk update of a field for existing SharePoint list items

Business requirement: Bulk update of a field for existing SharePoint list items.


Suppose you have created a SharePoint list or document library with some metadata columns. End-users start adding list items to this SharePoint list. After a while, they want to change the value for a particular column of already created list items. They could do this manually through the Edit in Datasheet mode, but suppose they have already created hundreds of list items in the SharePoint list... It would save a lot of time if an option would exist to bulk update a SharePoint field from one value to another in all list items for a particular SharePoint list.

An ideal scenario is off course a SharePoint column created with as type of information Lookup. Changing the value of the item where the Lookup column is getting its information from would update in mass all already existing SharePoint list items. But if this isn't the case, there is no real out-of-the-box SharePoint functionality to bulk update a field (except the Edit in Datasheet mode).

Solution: Use the SharePoint SUSHI application to bulk update SharePoint list fields.



Joseph Fluckiger created a solution called SharePoint SUSHI. SUSHI (SharePoint Utility with a Smart, Helpful Interface) is a user-friendly SharePoint application enabling you to accomplish SharePoint administrative and development tasks.

The following step-by-step description is a guide how you can do a mass update on a SharePoint list field with the SharePoint SUSHI application.
  1. Create an Issue Tracking list.
  2. Create several list items in the Issue Tracking list and make sure there are different values present for the field Issue Status, as this is the field we are going to use to do the bulk update.
    Your Issue Tracking list should look like this:

  3. Suppose the end-users now want to change value for the Issue Status column. They want the Issue Status Active to be called Started from now on. And off course, they want to change the column value for all existing issues as well to have a consistent look and feel over all issues.
  4. Edit the column Issue Status: change the choice value Active to Started. As such, upon creation of new Issue Tracking list items, end-users will have to choose the value Started in stead of Active for the Issue Status column. However, for existing list items, the value Active isn't changed towards Started. The next steps describe how this can be achieved.

  5. Download the SharePoint SUSHI application from CodePlex and install the executable on your SharePoint server. Start up the application.
  6. Select Meta Data in the left menu and enter the url of your SharePoint site containing the Issue Tracking list to the right.
  7. Click Retrieve Lists and choose the Issue Tracking list in the Target Document Library drop down box.
  8. Choose the Issue Status column in the Metadata Column Name drop down box.
  9. Choose Active in the Current Value drop down box.
  10. Type Started in the text box New Value.

  11. Click Update values in column to new value.

  12. Go back to the Issue Tracking list on your SharePoint site: all values are updated.


Continue reading......

by Patrik Luca 13 comments

11 August 2008

Add a SharePoint Web Part to multiple sites at once

Business requirement: Add a SharePoint Web Part to multiple sites at once


You might have created a set of similar SharePoint sites, all based upon the same site template, just like me. After some time, business requirements change, and the end-users want to have a new Web Part on all the home pages of each of these SharePoint sites. If there are a multiple SharePoint sites, you might want to avoid, just like me, to edit each of the home pages of those SharePoint sites one-by-one.

Solution: use the SharePoint Tips Utility Pack


Ishai Sagi developped a great package of utilities which can be downloaded from CodePlex: SharePoint Tips Utility Pack. I described in a previous post Hide list fields upon creation of a SharePoint list item how these utilities can be used to modify some SharePoint field settings which cannot be changed in the regular SharePoint interface.
However, Ishai's utilities offer also the possibility to push Web Parts to several SharePoint sites at once.

  1. Add your new Web Part to one of your SharePoint sites and configure it.
  2. Export theWeb Part and save it to your local disk.
  3. Start the SharePoint Tips Utility Pack.
  4. Choose Web Parts Management, Push Web Parts.
  5. Enter the parent site url in Site under which your sites are created on which you want to add the previously exported Web Part.
  6. Enter the Page on which the Web Part should be added.
  7. In the Select Web Part section, enter the path to your previously exported Web Part in the Web Part File field. Configure the Chrome, Zone and Zone Index for the Web Part you are going to add.
  8. Push Start.


As a result, your exported SharePoint Web Part is added to the SharePoint page you selected on all SharePoint sites under a particular SharePoint root site at once: no need to add the SharePoint Web Part on each SharePoint site individually.


Continue reading......

by Patrik Luca 4 comments

01 August 2008

Hide list fields upon creation of a SharePoint list item

Business requirement: Hide list fields upon creation / modification of a SharePoint list item


Suppose you want to hide a SharePoint list field upon creation of a list item and to show it upon modification of that same list item. Suppose you want to hide another SharePoint list field upon modification of a list item and to show it upon creation of a list item in that same SharePoint list.
This is something which cannot be achieved by using merely the out-of-the-box administration tools of SharePoint.

Solution: use the SharePoint Tips Utility Pack


Ishai Sagi developped a great package of utilities which can be downloaded from CodePlex: SharePoint Tips Utility Pack. With this tool you can modify some of the field settings of a SharePoint list which cannot be modified in the regular SharePoint interface.

To start using the SharePoint Tips Utility Pack, you need to install it on your SharePoint server, as the tool will only run if installed directly on your SharePoint server. The installation is very straight forward, as it comes with a Microsoft Installer package (MSI).

To show the strength and functionality of the SharePoint Tips Utility Pack, create a Custom List (call it Custom List) in your SharePoint environment and add to it following Single line of text fields with default settings:
  • ShowOnlyUponCreation
  • ShowOnlyUponModification

If you created the SharePoint Custom List correctly, it should look like this:


By default, both fields ShowOnlyUponCreation and ShowOnlyUponModification will appear on both the NewForm.aspx and the EditForm.aspx pages.
We are going to modify in the next steps the SharePoint field settings as such that the ShowOnlyUponCreation field will only be visible upon creation of a new SharePoint list item. The ShowOnlyUponModification will only be visible upon modification of an existing SharePoint list item.

  1. Start the SharePoint Tips Utility Pack.

  2. Choose Lists Management, Change Field Settings.
  3. Enter the Site Url of your SharePoint server and choose Load.

  4. In the Choose List dropdown field, choose the value of our previously created SharePoint Custom List, being Custom List.
  5. In the Choose Field dropdown field, choose our previously created ShowOnlyUponCreation SharePoint field.
  6. Uncheck the checkbox Show In Edit Item Forms.
  7. Press the button Set Values.

  8. In the Choose Field dropdown field, choose our previously created ShowOnlyUponModification SharePoint field.
  9. Uncheck the checkbox Show In New Item Forms.
  10. Press the button Set Values.



When you create a new SharePoint list item in the Custom List, you will notice that the ShowOnlyUponModification SharePoint field is not visible anymore.


When you edit the SharePoint list item, you will notice that only the ShowOnlyUponModification SharePoint field will be visible.


Continue reading......

by Patrik Luca 9 comments

Patrik Luca, Ieper, BELGIUM
Feel free to use or spread all of the content on my blog. In return, linking back to my blog would be greatly appreciated. All my posts and articles are provided "AS IS" with no warranties.

Subscribe feeds via e-mail
Subscribe in your preferred RSS reader

Subscribe feeds rss Most Read Entries

Categories

Recommended Books


Subscribe feeds rss Recent Comments

This Blog is part of the U Comment I Follow movement in blogosphere. Means the comment field of this blog is made DOFOLLOW. Spam wont be tolerated.

Blog Archive

My Blog List

Followers

Links