Saturday, July 28, 2012
Toggle section from within InfoPath form
Friday, June 22, 2012
Problem with setting field's internal name with AddFieldAsXml
check here - http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spaddfieldoptions.aspx
Using AddFieldInternalNameHint fixed my problem and it's not a bug.
Tuesday, October 5, 2010
User Profile filtering options with SharePoint 2010
Here is an example of importing User Profiles of Enabled user accounts from AD -
To import user profile information of user accounts that are enabled in Active Directory to SharePoint Server 2010, follow these steps:
- On the Manage Profile Service page, click Configure Synchronization Connections.
- On the Synchronization Connections page, click the Active Directory connection that you want to edit, and then click Edit Connection Filters.
- On the Edit Connection Filters page, follow these steps:
- In Exclusion Filter for Users, change the Attribute drop-down to userAccountControl.
- In Exclusion Filter for Users, change the Operator drop-down to Bit on equals.
- In the Exclusion Filter for Users, select Filter box type to 2.
- Click Add.
- Click OK.
Note: Similar to userAccountControl attribute you can create a combinations of Exclusion Filter for Users and Exclusion Filter for Groups with a lot of other AD attributes.
A second option which also can be used to filter out user profiles based on OU(s)/user(s)/Group(s) directly from Synchronization Connections. If you already have a synchronization connection then follow these steps for filtering users based on OU(s)/user(s)/Group(s).
- On the Manage Profile Service page, click Configure Synchronization Connections.
- On the Synchronization Connections page, click the Active Directory connection that you want to edit, and then click Edit.
- On the Edit synchronization connection page, follow these steps:
- Click on "Populate Containers" button, (make sure that you entered the password for AD sync account).
- Expand the tree view and uncheck any OU from which you don't want user profiles.
- You can also expand any OU and uncheck any user/group that you don't want to import.
- Click OK.
Issue to be aware of - I was able to select same criteria multiple times and it allowed me to save my synchronization connection without any problem. That was kind of odd. See below
Attribute Operator Filter Action accountExpires Is present accountExpires Is present division Equals A division Equals A
Except this one issue it really works well.
- In Exclusion Filter for Users, change the Attribute drop-down to userAccountControl.
- In Exclusion Filter for Users, change the Operator drop-down to Bit on equals.
- In the Exclusion Filter for Users, select Filter box type to 2.
- Click Add.
- On the Manage Profile Service page, click Configure Synchronization Connections.
- On the Synchronization Connections page, click the Active Directory connection that you want to edit, and then click Edit.
- On the Edit synchronization connection page, follow these steps:
- Click on "Populate Containers" button, (make sure that you entered the password for AD sync account).
- Expand the tree view and uncheck any OU from which you don't want user profiles.
- You can also expand any OU and uncheck any user/group that you don't want to import.
- Click OK.
Friday, September 24, 2010
FAST Search - Adding Content Source for Scope Rule type
Note:- Before you follow any blog make sure to check that they are related to the version you are dealing with. Don't follow a blog if its for Beta version of SharePoint 2010 when you have released version.
If you want to create new SCOPES with FAST search, now you can create scope filter from GUI instead of creating them using Windows PowerShell.
From technet -
=========================================
Documented product changes implemented in the August 2010 Cumulative Update (CU) - http://technet.microsoft.com/office/ee748587.aspx. With the CU installed, the FAST Search Server 2010 for SharePoint scope filter is automatically generated based on the scope rules created by using the graphical user interface. Administrators no longer have to create the scope filter manually by using Windows PowerShell.
=========================================
Create and view search scopes (FAST Search Server 2010 for SharePoint)
http://technet.microsoft.com/en-us/library/ff453895.aspx
One thing that is not clear from the above link is, creating scope rules based on content sources with FAST search. It's very easy to do with SharePoint 2007/2010 search - For "Scope Rule Type" you can select "Content Source" and then select your content source from the drop down list.
Now with FAST search on "Scope Rule Type" you won't see "Content Source" as one of the option to select, but it's part of "Property Query" with "Property Query" we can give codition for selecting content source "ContentSource = FileShare" (assuming that you already created a content source as FileShare).
Long story short with FAST search to access your Content source from a Metadata Property "ContentSource" which can be used to restrict or include results with Scope Rules.
Tuesday, July 6, 2010
SharePoint 2010 Training Resources
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.- Module 1: Getting Started: Building Web Parts in SharePoint 2010
- Module 2: What Developers Need to Know About SharePoint 2010
- Module 3: Building Blocks for Web Part Development in SharePoint 2010
- Module 4: Accessing SharePoint 2010 Data and Objects with Server-Side APIs
- Module 5: Accessing SharePoint 2010 Data and Objects with Client-Side APIs
- Module 6: Accessing External Data with Business Connectivity Services in SharePoint 2010
- Module 7: Developing Business Processes with SharePoint 2010 Workflows
- Module 8: Creating Silverlight User Interfaces for SharePoint 2010 Solutions
- Module 9: Sandboxed Solutions for Web Parts in SharePoint 2010
- Module 10: Creating Dialog Boxes and Ribbon Controls for SharePoint 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.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.Wednesday, June 16, 2010
Convert UTC date using Convert.ToDateTime Surprise
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
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 -
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

