Tuesday, July 6, 2010

SharePoint 2010 Training Resources

Here is a list of SharePoint 2010 resources that I thought might be useful to others -

Get Started Developing on SharePoint 2010

Software developers can use the SharePoint 2010 business collaboration platform to build enterprise-class solutions for intranet portals and the web. Use these ten modules to get started with development for SharePoint 2010 using Visual Studio 2010.


SharePoint 2010 Advanced IT Pro Training

Training to help experienced SharePoint IT Pros improve their skills and gain a deeper understanding of the product.


1|Core Architecture of SharePoint 2010
2|Security in SharePoint 2010
3|IT Pro Management in SharePoint 2010
4|Upgrading to SharePoint 2010
5|Enterprise Search in SharePoint 2010
6|Content Management in SharePoint 2010
7|Composite Solutions in SharePoint 2010
8|Communities in SharePoint 2010
9|Business Intelligence in SharePoint 2010
10|SharePoint Online Overview

SharePoint 2010 Advanced Developer Training

For developers, SharePoint 2010 provides a business collaboration platform to rapidly build solutions and respond to business needs. SharePoint 2010 Advanced Developer Training offers technical training as self-paced modules and hosted labs for SharePoint 2007 professionals who want to upgrade their skills to SharePoint 2010.

1|Developer Roadmap and Tools
2|Core Development
3|User Interfaces and Lists
4|Data Access in Technologies
5|Composite Solutions
6|Enterprise Content Management
7|Enterprise Search
8|Business Intelligence
9|Communities
10|Development Life Cycle

Wednesday, June 16, 2010

Convert UTC date using Convert.ToDateTime Surprise

While working on a project I had to convert a date string to DateTime object. As the date value was coming from SharePoint it was a UTC date - "2010-01-01T00:00:00Z". So looking at the date value I expected that Convert.ToDateTime or DateTime.Parse will return me 1/1/2011 12:00:00 but to my surprise I was getting 12/31/2010 7:00:00 PM I quickly realized the mistake I was doing and searched MSDN and thanks to SPUtility class for the rescue. So convert UTC date string to a DateTime object use the following method to get the correct date -

objectDateString is object type with value "2010-01-01T00:00:00Z"

SPUtility.CreateSystemDateTimeFromXmlDataDateTimeFormat(objectDateString.ToString()) returns {1/1/2011 12:00:00 AM} System.DateTime

or the following will also return correct date -

Convert(objectDateString.ToString()).ToDateTime().ToUniversalTime()



using DateTime.Parse or Convert.ToDateTime I was getting wrong dates -
DateTime.Parse(objectDateString.ToString()) returns {12/31/2010 7:00:00 PM} System.DateTime

Convert.ToDateTime("2010-01-01T00:00:00Z") return  {12/31/2010 7:00:00 PM}

Again lesson learned to treat DateTime values with respect. :)

For more information in this -
http://www.jamestsai.net/Blog/post/SPRegionalSettingsGlobalTimeZones-How-to-build-world-clock-get-time-zones-information-in-SharePoint.aspx

http://www.novolocus.com/2008/07/31/sharepoint-web-services-and-utc-time-fun-and-games/

Saturday, May 22, 2010

Using this.Submit to close InfoPath form

Lately I was working on a InfoPath form.  I thought that it will be nice if I can validate the form with custom code and also close it.  I didn't liked the Submit button event handler as it was displaying its own pop dialog box before showing my custom error messages.  I added my own button I tried to use this.Submit() method to execute Submit form option for closing the form, as we know that you cannot call "Close form" from your code.  On form Submit option using "Perform custom action using code" I end up gettting this exception

XmlForm.Submit cannot be called from the SubmitEventHandler.

Finally I figured out that if I use "Perform custom action using rule" on Form Submit options dialog box then from custom button action event handler I can call this.Submit() and it allow for me allowing me to close the form by calling form Submit option - "Close the form".

In case anyone of you interested in how its done here is my project and xsn file -

http://cid-cb9fe32f865358ac.skydrive.live.com/browse.aspx/Public/Submit?lc=1033

also here are some of settings that I had in my form -

On the rule dialog box I just set a temp field to 1,



I hope this will be usefull to those who want to submit and close the form on the same page using code without adding extra view/page to close the form.


Thanks,
Suhaib Khan

Friday, October 23, 2009