Click on this icon to open the XML page.Tom Van Gaever - Blog
Search:   

AfterProperties.PercentCompleted: Input string was not in correct format. 
Wednesday, July 15, 2009, 12:14
Posted by Administrator
A small tip while using the OntaskChanged activity, if you want to check if the assigned has completed his task don't use the AfterProperties.PercentComplete property .

Problematic situation:
A user modifies the task and the OntaskChanged_Invoked eventhandler is triggered. In this eventhandler the system checks is the user completed the task by setting the PercentCompleted formfield.
When the user doesn't uses the PercentCompleted field, but he uses the Status field. The workflow will crash because the code that is written behind the PercentComplete property of the AfterProperties object uses the StringToNumber(...) method.

//This will crash if the user leaves percentcomplete empty
string perComp = AfterProperties.PercentComplete;


Solution
AfterProperties contains a hashtable called ExtendedProperties, this hashtable has a guid as key(these guids can be found here ) and the current value as a string.By using this hashtable the system can first check if the Guid is available and if the stringvalue is valid.

//Get the percentcompleted value of the task by using the hashtable   
string perComp = AfterProperties.ExtendedProperties(Microsoft.SharePoint.SPbuiltInFieldId.PercentComplete);
if(String.IsNullOrEmpty(perComp)){
...

You should also check if the user didn't use the status combobox to set his task as completed.

//Get the status value of the task by using the hashtable
string status= AfterProperties.ExtendedProperties(Microsoft.SharePoint.SPbuiltInFieldId.TaskStatus);
if(status == "Completed"){
...

2 comments ( 27 views )   |  permalink   |   ( 2.9 / 553 )
How to download Internet Explorer 8 for Windows 7 E without any Web browser?  
Wednesday, July 15, 2009, 11:08
Posted by Administrator
Windows 7 RTM will be available in the next days and for all European users there will be no Internet Explorer 8. I’m not sure if there will be an option to install Internet Explorer from the setup DVD or if we can simple add this as a Windows feature in control panel.

Michael Schwarz has written a nice batch to help you.
add comment ( 3 views )   |  permalink   |   ( 3 / 517 )
SharePoint 2010 : 2010 (Technical Preview) Developer Documentation 
Tuesday, July 14, 2009, 19:05
Posted by Administrator
New information available about the new SharePoint version 2010.

Summary: The Ribbon is now included in the user interface for Windows® SharePoint® Services “14” and Microsoft® SharePoint® Server 2010. It can be extended by using a combination of XML and ECMAScript (JavaScript, JScript). Customizations to the Ribbon are created by using the Feature infrastructure and can be deployed by using the Windows PowerShell™ command-line interface, a solution package, or a user custom action.


Customizing the Ribbon in Windows® SharePoint® Services 14

SharePoint Products and Technologies: 2010 (Technical Preview) Developer Documentation
Microsoft SharePoint Products and Technologies Protocol Documentation

add comment ( 5 views )   |  permalink   |   ( 3 / 589 )
SharePoint 2010 : Sneek Peek 
Monday, July 13, 2009, 20:59 - SharePoint
Posted by Administrator
http://sharepoint.microsoft.com/2010/Sn ... fault.aspx


add comment ( 3 views )   |  permalink   |   ( 3 / 551 )
My Recorded Session : Community day 2009 
Friday, July 10, 2009, 09:08
Posted by Administrator
It was the first time that I had the chance to speak in front of a large audience (a filled movie theatre). Several weeks later, it is very confronting to hear yourself searching for the words that you have been rehearsing over and over again...

Get Microsoft Silverlight




add comment ( 2 views )   |  permalink   |   ( 3 / 388 )

<<First <Back | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Next> Last>>