Wednesday, 28 January 2009

GetUserProfileByName Profile properties

When working with the UserProfileService webservice there are a number of Profile properties you can get when you use the GetUserProfileByName method.

I have listed the Profile properties in the buttom of this post.

If you have added new Profile properties in Central Administration - Shared Services - User Profiles and properties, you can get them as well, just remember to use the Name instead of Display Name.
You can see the name of the property following the link above and select View Profile Properties and select Edit on one of the properties. Here you can see the Name.

How to use the webservice follow this link:
http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx

Profile properties:
UserProfile_GUID
AccountName
FirstName
LastName
PreferredName
WorkPhone
Office
Department
Title
Manager
AboutMe
PersonalSpace
PictureURL
UserName
QuickLinks
WebSite
PublicSiteRedirect
SPS-Dotted-line
SPS-Peers
SPS-Responsibility
SPS-Skills
SPS-PastProjects
SPS-Interests
SPS-School
SPS-SipAddress
SPS-Birthday
SPS-MySiteUpgrade
SPS-DontSuggestList
SPS-ProxyAddresses
SPS-HireDate
SPS-LastColleagueAdded
SPS-OWAUrl
SPS-ResourceAccountName
SPS-MasterAccountName
Assistant
WorkEmail
CellPhone
Fax
HomePhone

InfoPath Rules DataValidation

If you have an Control, ex. a TextBoxt you can validate the text using a pattern.

Todo:
  1. Doubleclick on the TextBox or left click and choose Options
  2. Click DataValidation
  3. Click Add
  4. In the first dropdown select the TextBox (selected as default)
  5. In the second dropdown select "Does not match pattern"
  6. In the third dropdown select Userdefined pattern and enter the pattern.

Here is a growing list of patterns.

Email: (\p{L}+_*-*\p{L}*\d*\.?)+@(\p{L}+-*\p{L}*\.?)+
It's not perfect, because it allows a.b.@c.com and a.b@c.com., but it does allow a.b.c@d.com and a.b@c.subdomain.com

Thursday, 15 January 2009

Eventhandler associated with incoming email

Just a little reminder:

If you want to debug an eventhandler associated with incoming email, you need to connect to the OWSTimer.exe instead of w3wp.exe, as the OWSTimer takes care of the email and the event handler.