A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Tuesday, December 8, 2009

Successful SharePoint Community Launch

SharePoint Pakistan User Group (SharePointPUG) held a successful event in Lahore on Dec 5,2 009. Event details can be found at the following URL: http://splahore.eventbrite.com SharePoint 2010 was showcased at the event. People showed great interest in this upcoming version of SharePoint. Beta is available and can be downloaded from the Microsoft site. Presenters showed new features available in the SharePoint 2010. Fig 1: Jerry presenting SharePoint 2010 Fig 2: Audience viewing the SharePoint 2010 features You can view more pictures by visiting the following URL: http://cid-14111469622c2da2.skydrive.live.com/browse.aspx/SharePoint%20Pakistan%20User%20Group%20Meeting?ct=photos

Sunday, November 8, 2009

SPSPhilly Photos

Watch SPSPhilly (Nov 7, 2009) photos on my facebook profile. Facebook ID: saifullah_shafiq@hotmail.com

Notes from SPSPhilly: Integrating SharePoint with LOB Applications

SharePoint Saturday Philly Session: Integrating SharePoint with Line of Business Applications by Gurpreet Maini Where to start?
  • Selecting a farm topology
  • Capacity planning
  • Scalability approach
  • Virtualization
  • Disaster recovery strategy
  • Deployment strategy
  • Coding best practices
  • Integration strategy
What do you want in SharePoint?
  • Who will be using the site?
  • What actions will they perform?
  • What level of security is needed?
Taxonomy strategy
  • Content types
  • Site topology
Governance plan
  • People
  • Process
  • Technology
  • Policies
Selecting a farm topology? Single server, Small, medium, large Capacity planning equation: R = (P * H) + X R: request per second P: pages per second H: average hits per second X: search queries Disaster recovery and fault tolerance strategies Full or differential backups Recover accidental deletions Fault tolerance strategies Deployment best practices
  • Package it! Features and solution deployment
  • Package will ensure automated controlled process
  • Best way to push and manage deployed code
    • Test, test, test
    • Even configuration
  • Consider virtual environments for dev, test/UAT
What are features?
  • They wrap custom development and gives new piece of info to SharePoint
Coding best practices
  • Don’t alter SharePoint schema, assume it will change
  • Use facilities that already exist, such as ULS logs, instead of building your own
  • Note that accessing list by name performs a bit slower than accessing lists by index or unique id.
  • Limit amount of work performed in an event receiver
  • Don’t evaluate lists.items in a loop expression
  • Dispose of types correctly. If you access from context, do not dispose.
Customer challenges
  • Less custom integration code
  • Deep integration of data
  • New app types that blend data and collaboration
  • Lack of structured data search
  • Bridge portal and business application UI
  • Centrally manage security, auditing, connections
Integration strategy
  • Lob application integration strategies
    • Asp.net web part development
    • InfoPath 2007 forms
    • Web services development
    • Biztalk
    • BDC
    • Workflows
    • Features
InfoPath works good with BDC. Workflows can also be used to retrieve data from external apps. Infopath forms
  • Infopath can talk with metadata.
Excel services
  • Share spreadsheets via zero-footprint browser experience
Dashboards and web components
  • KPIs, excel workbooks and SQL Server 2005, reporting services report
BDC architecture
  • Features and components
  • Shared service
Design motivations
  • No code integration
  • Centralized deployment
  • Real-time access
  • Centralized data security
  • Designed for portal and collaboration
  • Data query, indexing, personalization
BDC is not about?
  • Transactions
  • Workflows
  • Data transformations
  • Adapters
BDC metadata model
  • Two purposes
    • Describe a system API
    • Give meaning to the API, make it easily usable
  • Key objects
    • System
    • Entity
    • Method
    • Association
BDC application permissions
  • Edit
  • Execute
  • Select in clients
  • Set permissions
BDC web parts
  • BDC List View Webpart
Business data search
  • Search any db.web service not just documents
  • No need to write iFilters or protocol handlers for business data
  • No need to create html representations of data
  • Highly customizable results
  • Deep integrations with scopes
User profiles
  • You can import profile from any user profile db
  • Filter web parts with userprofile filters
  • Map user profile property to field of entity
  • Business specific targeting and personalization
BDC
  • Configuration application
  • Configuring key BDC web parts
  • Searching business data
  • Integration of business data with SharePoint lists
Development lifecycle
  • Analyst defines business requirements
  • Developer writes and tests app definition
  • It pro uploads app definition
  • Analyst builds the solutions using business data features
BDC API
  • Runtime API
    • Browse metadata, execute methods, retrieve instances, traverse relationships
    • For custom app builders
  • Admin API
    • Create, read, delete
BDC authentication
  • Passthrough: the authentication mode quite literally passes credentials through from the front end (sp) to the back end (lob app identified via the BDC)
  • Reverttoself: this mode reverts whatever impersonation might be done by IIS and authenticate against the BDC app using the identity of the IIS app pool itself.
  • SSO: uses the sso subsystem for authentication to BDC
  • rdbCredentials: it’s SSL
(Note: These notes were taken while blogging live. Please ignore any typos you may find. Thanks) Personal Note: If you want to learn more about BDC and integrating line of business applications with SharePoint, read the following wrox blox: http://www.amazon.com/gp/product/B0026A6ATW

Notes from SPSPhilly: Deep dive into SP 2010 MySites

SharePoint Saturday Philly Session: Deep dive into SharePoint 2010 MySites and Social Networking by Russ Basiura
  • What’s new:
    • Social networking
      • Tagging
      • Bookmarking
      • Note board
      • Ratings
      • Tagging:
        • You have audit trail, who tagged what!
        • Social networking
          • Mysite
          • Profile
          • Newsfeed
          • Colleague tracker is a linkedin type functionality. You can track your colleagues.
  • Social networking
    • Tracking colleagues
      • Better, more readable newsfeed
  • Email notifications
    • Noteboard
    • Colleague addition
    • Keyword suggestions
  • Profile updates
    • Alerts to update
    • Status message

Notes from SPSPhilly: Search for SP 2010 and FAST ESP

SharePoint Saturday Philly Session: Search for SharePoint 2010 and FAST ESP by Natalya Voskresenskaya Natalya is a SharePoint MVP. She speaks about SharePoint Search and ESP Fast today. Agenda Enterprise Search Value Architectural Changes FAST search linguistic features Lemmatization Entity Extraction and Synonyms Structural Analysis Dictionaries New Search experience Configure, extend, create new Enterprise Search Value What’s the true value in Enterprise search? Impose multiple layers of information architecture on top of structured and unstructured content. It helps you build a 360 degrees view of what’s happening in the company. File shares, hard drives are full of information but no one knows what’s in there. People don’t think about organizing information. People should organize the information. That’s where taxonomy comes in. We replicate information. Companies replicate information. If there is really no easy access to information then you don’t have that information. The problem is that all the documents have to be tagged with the information. This is called meta tagging. SharePoint Search 2007 Problem with SharePoint Search! It ‘s locked. You can index data from all custom databases but you cannot impose your business rules on top of the business engine. SharePoint has its indexing engine but it is used only for people search. FAST Search extends SharePoint server Advantages: High availability! Why new search is so great? Why 2007 search was failing so badly? Important part in search engine is preprocessing. When document is normalized, all characters are normalized to the language in which they are searchable. Documents should be properly index to be searched. Pre-processing Doc id Text normalization Processing All the magic stuff Post –processing Signals to indexer Common Scenario Search string: “looking for SP architect” Query: “looking” and “sp” and “architect” First result: “set of 4 dunlop sp sport 6000 tires ….” Search engines remove noise words from the sentences. Contextual insight Contextual insight annotates the scope with entity metadata by extracting all the entities it can find to provide the answers. FAST understands paragraphs, addresses, names, company names, phone numbers. It also has natural language processing. Main thing is contextual support. It’s amazing. Linguistics Determine the language Tokenization and normalization Spelling and spelling variation Anti-phrasing and stop words Synonyms, acronyms Pronunciation Entity extraction Lemmatization Mapping of the word to its base form and base form variation. “Walk” is the base form of word “walking”. And hence this matches in both stemming and lemmatization. Lemmatization dictionaries Dictionaries Nouns Adjectives Verbs Blacklist Dictionaries in SP 2010 Now you can create your own dictionaries. In SP 2010 you can do it through the UI. Notes/Interesting topics and points
  1. Relevance tuning
  2. Proximity boosts
  3. Context boosts
  4. Boosts are based on the contexts. If information is found in the meta data then the boosting of the document goes up.
  5. Now we can extend search capabilities
  6. Now you can use BCS (Business Connectivity Suite) in SP 2010. No need to create ADF files! BDC was difficult to use. Searching external data in SP 2010 is easy.
  7. Now you can create solutions in VS
  8. 118 Powershell Search cmdlets
Follow Natalya on Twitter: @natalyvo Blog: http://spforsquirrels.blogspot.com (Note: These notes were taken during live blogging. You may find typos and other mistakes. Please ignore them. Thanks.) To see more pictures of this event, visit my facebook profile: saifullah_shafiq@hotmail.com

Notes from SPSPhilly: Findability, Putability and Taxonomy building in SP 2010

SharePoint Saturday Philly Session: Findability, Putability, and taxonomy building in SharePoint 2010 by Bill English Fig 1: Bill English starting his session What is Putability Definition: The quality of putting content in the correct location with the correct metadata. The degree to which we put quality information into our information management system Truths: What goes in, must come out: garbage in, garbage out What is findability Definition: the quality of being locatable or navigable The degree to which objects are easy Putablity, findability and technology Most are clueless when it comes to thinking about how information should go into SharePoint Fig 2: Full room during Bill English’s session Notes/Interesting points
  1. Great architecture will save your company significant monies through increased efficiencies.
  2. Great architecture will give your organization a greater ROI on its’ Microsoft technology investments
  3. Over 30 billion documents are created each year
  4. Cost of documents is estimated to be as much as 15% of annual revenues
  5. 85% documents are never retrieved
  6. 50% of documents are duplicate in some way
  7. 60% of stored documents are obsolete
  8. 3.5 hours are spent by employees to search but they don’t find documents. Cost per year reaches 5,251.
  9. Findability is not a technology. It is a way of managing information that is baked into the organization.
  10. Search is too often viewed as an application-specific solution for findability. Findability is a well-defined and well-executed strategic model of consistent practices and actions.
  11. People face problems because they avoid business requirements phase.
  12. Information overload: we need right info at the right time
  13. $900 billion cost to the economy in 2008 (WSJ)
  14. 54% of us report feeling a “high” when we find information that we were looking for.
  15. 80% of us feel driven to gather as much information as possible to keep up with customers and competitors.
  16. IQ is dropped by 10 points during information overload while smoking pot drops IQ by 5 points.
  17. #1 threat to company’s network security: employees who inadvertently exposed confidential information.
  18. We can develop custom apps for tagging by using the metadata OM
  19. Tagging can be done with web browser
  20. Tagging can be done with office clients
What is e-discovery? Dispute -> file civil claim -> discovery -> trial or settlement Discovery is the exchange of evidence between the parties MMS – in a nutshell
  1. content type distribution system
  2. enables enterprise-wide CT usage
  3. retains local control
  4. pull technology
Enterprise taxonomy development Problem: users don’t want to take the time to tag information (Solution) MMS feature: force metadata assignments via closed lists and DIP Problem: users don’t know what metadata to select (Solution) MMS feature: users can select from a set of choices in a choice list The MMS is about putability, not findability (Note: This is live blogging. You may find typos and mistakes. Please ignore the mistakes. Thanks.) Personal Note: You can read more about MMS here: http://technet.microsoft.com/en-us/library/ee424403(office.14).aspx

Notes from SPSPhilly: Session Upgrading existing products to SP 2010

SharePoint Saturday Philly Session: Upgrading existing products to the new SharePoint 2010 by Shai Petel null
  • Building a new solution


    • VS 2010 extensions for WSS are required to build solutions.
  • Is your team ready for 2010?


    • Silverlight, ajax, json
    • Visual web parts
  • Prepare to be hosted


    • Limit customization to site collection level
    • Prefer to support sandboxed solutions
  • Creating a new web part?


    • Inherit from existing .net web part.
    • Sharepoint web part is for backward compatibility
    • Asp.net web parts are a good choice because they have the capability to be hosted in SP.
    • If you change the base type of an existing web part, it does not know how to serialize, it will stop functioning.
    • Connections out of the zone don’t work in asp.net web parts but those are not required in SP 2010 so it’s safe to use asp.net web parts
    null
  • What is required to start development in SP 2010?


    • Visual studio 2010 + VSeWSS
    • SharePoint Designer
The above two are the tools that are required for SP 2010 development in VS. You have following options to create development environment:
  1. Install in one server
  2. Client/server
  3. Virtualization (recommended)
PROs and CONs:
  1. Install in one server
Pros: isolated, developer control, slower hardware, performance Cons: win7/win 2008 64 bit, hard to backup, easy to mess up
  1. Client/server
Pros: easy to backup, hard to mess up the server, slower computers, runtime Cons: not isolated, no control on farm
  1. Virtualization
Pros: isolated, developer full control on farm, backup; duplicate; portable, restore Cons: win7 or win2008 64bit only, strong computer
  • VS 2010 has SharePoint templates for development.


    • Create a new solution
    • Choose a template
    • Setup trust level
    • Adding new components
    • One-click deploy or package
  • Visual web part


    • This project type cannot be sandboxed because requirements exceed limitation of sandboxing.
    • All files are inside MyWebpart folder.
    • VS 2010 creates a package for you. Package is for one project. It sounds limiting but it is not. You can use feature from on one project in another project. It sounds complicated. Copying feature to another project will link it. It will not create a new copy. You can share the elements of one web part package with other projects. You also have feature designer.
    • You can decide where to deploy the web part, for example, on the front end server.
  • Using shared resources in WSP


    • There is a disadvantage!
14 hive is not supported in sandboxed solutions
  • Some APIs will not work in sandboxed solutions
  • Groups cannot be added in sandboxed solutions, buttons can be added
  • New APIs: Microsoft.SharePoint.Linq.dll, Microsoft.SharePoint.Client.dll, Microsoft.SharePoint.Taxonomy.dll
  • When upgrading, keep namespaces and assembly evidence same. Also, keep elements GUID same.
(Note: These notes were taken during live blogging. Please ignore any typos or mistakes that you may find. Thanks)

Tuesday, November 3, 2009

Hardware for SharePoint 2010

AC has posted a fantastic article today. He talks about the hardware he uses for SharePoint 2010 development. Here is the link: http://www.andrewconnell.com/blog/archive/2009/11/03/doing-sharepoint-2010-development-ndash-whatrsquos-in-your-rig.aspx Article has some fine suggestions about the hardware that you can use and increase your development speed. These are not mandatory requirements by the way. You can use a low configuration laptop to do SharePoint 2010 development but that's the primary difference between a novice and an expert. If you just want to experience SharePoint 2010 (no development), you can run it on a 32 bit system as well using virtualization. One of my SharePoint 2010 installations run on a 32 bit system. Following is the configuration I use for 32 bit system: Lenovo T61 (IBM ThinkPad) OS: Vista 32 bit Processor: Intel Core 2 Duo T7700 @2.40 GHz 2.40 GHz RAM: 4 GB (32 bit systems use only 3 GB) HDD: 160 GB Single Partition Virtualization: VMWare Workstation 7 Windows Server 2008 R2 This is the minimum configuration I believe that you need to run SharePoint 2010 :). You can increase the performance by adding a SSD (as suggested by AC) and/or increasing the RAM. For my daily use, I use a 64 bit system for SharePoint development. My 64 bit configuration is as following: HP laptop 7200 RPM HDD 8 GB RAM Quad Core Processor

Thursday, October 29, 2009

SP 2010 hardware and software requirements

Upgrading to SP 2010

You will see lots of links explaining this process in the near future. Here is one link that explains the upgrade process: http://technet.microsoft.com/en-us/library/ee617150(office.14).aspx

Installing VS 2005 Team Suite on Vista

If you are installing VS 2005 Team Suite on Vista, don't forget to install following service packs after you have installed VS: Visual Studio 2005 Service Pack 1: http://www.microsoft.com/downloads/details.aspx?familyid=bb4a75ab-e2d4-4c96-b39d-37baf6b5b1dc&displaylang=en Visual Studiio 2005 Service Pack 1 Update for Windows Vista and Windows 7: http://www.microsoft.com/downloads/details.aspx?FamilyID=90E2942D-3AD1-4873-A2EE-4ACC0AACE5B6&displaylang=en

SharePoint 2010: Hands-on labs

Monday, October 19, 2009

SharePoint 2010 Links

Single server complete install of SharePoint 2010

Project 2010: Introducing Sync to SharePoint

What's new for end users in SharePoint 2010

What's New in SharePoint Foundation 2010

http://msdn.microsoft.com/en-us/library/ee539826(office.14).aspx Microsoft SharePoint Foundation 2010 includes many new features. Read more on the msdn link given above.

New SharePoint 2010 links on the SharePoint team blog

SharePoint 2010: http://blogs.msdn.com/sharepoint/archive/2009/10/19/sharepoint-2010.aspx SharePoint 2010 Resources: http://blogs.msdn.com/sharepoint/archive/2009/10/19/sharepoint-2010-resources.aspx

Getting started with SharePoint 2010 for developers

Wednesday, October 14, 2009

Unable to shutdown/restart Windows

Do you get this error when you try to shut down Windows? Solution: 1. Kill explorer.exe process 2. Start explorer.exe process. You can start new process by going to File menu in Windows Task Manager. Select "New Task (Run...)" and enter "explorer.exe" and Ok to start this process. Now your computer will shut down. This error occurs when you try to copy or move a file from your computer to another computer and cancel the process in the middle. In my case, I was trying to copy my VPC image to another machine but cancelled the process. Later when I tried to shut down Windows in my VPC, it threw this error. Killing explorer.exe resolved the issue.

Wednesday, October 7, 2009

InfoPath fails after applying SP

Service packs fix lots of issues in the installations but sometimes they also create problems. It becomes a pain to track down the source of the problem if you have a huge setup. A user yesterday reported the following problem after he applied SP2 on the server running InfoPath: The format of the Canary has been tampered with for form xxxxxx by the end user. Exception message: The security validation for this form is invalid. Some users also reported this problem when they installed SP1. Exact cause is not known but following are some hints that can resolve the issue (at least temporarily unless you get a reliable fix): 1. Replace Microsoft.Office.InfoPath.Server.dll with the version that was working before you installed the SP. 2. Replace core.js with a newer version (worked for the user who reported this). Core.js is located in SystemDrive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\INC\

Visual Studio: alway run as administrator

Nice tip from Serge van den Oever: http://weblogs.asp.net/soever/archive/2009/10/07/visual-studio-alway-run-as-administrator.aspx Using this tip you will always log into VS 2008 as an admin without the need to explicitly login as admin.

SharePoint 2010 books

http://wssv3faq.mindsharp.com/Lists/SharePoint%202010%20Books/V%a20Books.aspx

Step-by-Step SharePoint Disaster Recovery

A must read article for new SharePoint admins! Randy Williams has shown how one can recover SharePoint from the content dbs. He has also given recommendations on how to back up SharePoint farm. http://windowsitpro.com/article/articleid/102572/step-by-step-sharepoint-disaster-recovery.html

SharePoint history (by sptblog)

A very nice article about SharePoint history published on SPTBlog. http://blogs.msdn.com/sharepoint/archive/2009/10/05/sharepoint-history.aspx

Estimating Transaction log growth rate

If you are a SharePoint admin, you will be interested in reading the following article: http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?List=0ce77946%2D1e45%2D4b43%2D8c74%2D21963e64d4e1&ID=111 Using Powershell, you can estimate content database transaction log growth rate. Transaction log sometimes grows out of proportions and becomes a source of bringing down the server.

Tuesday, September 29, 2009

An error occurred while parsing EntityName

Let's talk about this error that you get when installing a SharePoint WSP. You also get this error in .NET apps if your XML is malformed. This error occurs if your XML has an "&" somewhere in the content. Replace it with "&" to get rid of the error. If your instance.xml has data, check data and get rid of all ampersands (repalce with " &").

Wednesday, September 16, 2009

Visual Sourcesafe 2005 setup fails

Scenario: To work on an old project, I need to setup SourceSafe 2005 on a machine that already has .NET Framework 3.5 installed. I start the installation but mistakenly unplug the power cable and system shuts down. Next time I start the installation, I get "Setup failed" error message. Setup fails because it cannot find Microsoft Document Explorer 2005 installed on the system. I found following link while searching for the solution: http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/e59f8083-3ebc-4b90-ae35-c4e3fcd33606 It has some good suggestions but not valid in my case. I knew something went wrong because the computer was unplugged when setup was running. If you go to "Add and Remove Programs" in Control panel, you will see .NET framework installed. In my case, there were different versions installed. From .NET 1.1 to .NET 3.5, all versions were installed. There was one instance that did not have any version number shown next to it. I removed this instance and during uninstallation, it gave message that "Installation of Microsoft Document Explorer 2005 was suspended. Do you want to continue and remove the installation" (I don't remember the exact wording). I clicked YES and this instance was uninstalled. Next, I tried to run the setup again and this time SourceSafe was installed successfully. The reason why I am posting this is because while searching Internet for the solution, I noticed several links/posts that gave miscallaneous solutions but none mentioned uninstallation of the corrupted or incomplete installation of the .NET framework. So this is also a solution, if you have tried all other options and still cannot install SourceSafe because of Document Explorer error, simply uninstall the .NET framework and run the SourceSafe setup again. Be careful if you have Visual Studio and related programs running. Make sure you uninstall the .NET framework version that is causing the problem. In my case, it was the one without any version number.

Saturday, September 12, 2009

SharePoint Saturday NY: SharePoint Branding Session coverage

Special Interest: SharePoint Branding: How do you even begin? About the session (From SharePoint Saturday NY site): In this session, I will cover the importance of planning before you begin designing your SharePoint site. I will cover the basics of SharePoint branding. I will also cover some Best Practices and Design Gotchas that I have experienced. The session will only have brief looks at the code of a custom theme and a custom master page. About the speaker: Cathy Dew Company: CTS, Inc Blog: http://www.sharepointcat.com/ Cathy Dew is a graphic designer and SharePoint Consultant for CTS in Birmingham, Alabama. Cathy comes from an Advertising Agency and Graphic Design background, so her focus is on User Interface Design and User Experience with sites. She has worked on many SharePoint installations to brand SharePoint and make it look “Not like SharePoint”. She is also the President and Founder of the Birmingham SharePoint User’s Group Retweets: RT @keith @catpaint1 #spsnyc #sharepoint: RT @ericharlan: http://twitpic.com/hhbbs - @catpaint1 at #spsnyc doing her thing packed room Master pages contain common page elements Assigned to a site Will take longer to reference javascriot if put on the master page. Put in CEWP Master Pages ASP.NET 2.0 Store code for layout and design 1 or more can be used Used everwhere in Sharepoint Drawbacks to Themes On Server Must be reapplyed after edits to each site used SPTHEMES.XML controls the themes available Always make a bakup Themes do not create design Good for images and color Also apply to _layouts directory Can be used with Maters, site defs and templates Store all custom CSS is one place ONE FILE! DO NOT EDIT CORE.CSS Any Styles in a Master Page is called last. Refer to custom CSS in Master Page Best Practices store CSS in new directory on server 26 different style sheets in different places some on server some on content DB 20,000 lines of CSS Understanding grouping and inheritance is important Each need own branding Meeting Workspace uses unique master page 4 Common Site templates Blogs WIKIS Meeting Workspacce Document Workspace Site Definitions more difficult Stored on the server Farm Wide Link to Master Pages Definitions can include branding Wat r Site Templates and Definitions? Templates are a cookie cutter takes a snapshot and can use for new sites15 minutes ago from web branding: Use content placeholders and SharePoint user controls for customization branding: Search boxes are very customizable. Can put in a custom site action so its permission trimmed. Can be moved seperately from other nav Quick Launch Bar? Yes or NO? Do they want View all sitecontent? Start by looking at default.master and decide what you want to use in our design Page layout only availbale on MOSS stored in Master Page gallery Thanks for restarting the camera. Stream was down for some time. (meetdux live > http://ustre.am/61Db) Master Page Header Footer Nav Unique items, contact ads, links site wrapper, content placeholders Page llayouts Master pages are more time intensive but offer more ways to change Thems change the look but not the location of parts. Master Page Complete control over site design Link to CSS How to brand?? Theme Alternate CSS change images Sored on web server SharePoint Onion: Master Pages and Themes Page layouts and content pages make u cry The SharePoint ONION! (It makes you cry....)?? Many layers Content stored in 12 or in content DB Know whats in the 12 and DB. Use a DEV enviro. to look around A Lot of work to change fonts 20,000 lines of CSS is a LOT to look through. Don't use EM Text in Dynamis NAV No images or buttons if using OOTB Taxonomy Gotchas Fluid width or fixed? Intranet should be fluid coz of lists and libraries and users Site requirements affect design Splash page? Sus different? Home page? Navigation OOTB or custom Taxonomy affects branding Different structures require different branding WIKI Extranets,WSS sites SharePoint Taxonomy: Take into consideration External Links. Think of the future and plan for growth SharePoint Taxonomy: Step 5) Navigation Top and Left? Major sections and nav Drop Down nav SharePoint Taxonomy: Each site should have a pages library SharePoint Taxonomy: Identify Pages, permissions, how many, major areas, etc Step 2) Indentify Content types Step 3) Page Layouts Step 4) Identify Site Structure SharePoint Taxonomy SharePoint Taxonomy: Step 1 Evaluate and Plan like any other site Taxonomy - Classification 2 Types of SP taxonomy Structure and View (Used more in branding) content types can be shared across Lists and Libraries and across Web Parts Content Types Can be used across the site Can be shared across mutiple content types Branding: 2)Where do you start? Include Usability and look What do you need to know before you start? 1) What type of site? Each have different requirements. SPD Features CheckinOut Publish Import/Export useful for moving View for multiple screen resolutions SPD most widely used for branding. Intial development and then move into VS What is Branding?? Master Pages, Layouts,CSS,Web Parts XML, Images Note: I was not there. I was retweeting the session points and this post has all the RTs in one place.

SharePoint top 100 blogs

Joel Oleson has recompiled list of top 100 SharePoint blogs. http://www.sharepointjoel.com/Lists/Posts/Post.aspx?List=0cd1a63d%2D183c%2D4fc2%2D8320%2Dba5369008acb&ID=93 My blog has gone down 20 positions. Makes sense! My blog has been down at least twice for long periods. I did not want to leave SharePointblogs.com :) and now I was seriously thinking of changing my blog because the server was down for quite some time now but Dustin changed the server right on time. Thanks Dustin! sharepointblogs.com is first love and I will continue to use it as my technical blog. The url has changed as you may have noticed. Luckily my posts are still intact.

SharePoint is nice nice baby remix

BDC definition editor tool (wrox blox)

SPD workflows session @ SharePoint Saturday NY (My retweets)

Retweets: RT @keith #spsnyc #sharepoint Alerts can be combined with workflows or used out of the box for a simple workflow. RT @keith #spsnyc #sharepoint SPD can allow dynamic URL's in the E-mail body instead of loooong links RT @keith #spsnyc #sharepoint Use the logfiles in SPD to troubleshoot errors. Enable in the workflow RT @keith #spsnyc #sharepoint http://spdactivities.codepl... RT @keith #spsnyc #sharepoint Codeplex has many custom workflows to improve SPD out of the box RT @keith #spsnyc #sharepoint Triggering workflows from approvals can cause problems with status RT @keith #spsnyc #sharepoint SPD allows a better product especially with E-mail notifications. RT @keith #spsnyc #sharepoint SPD pitfalls: nested conditions (if) Space Characters in the URL, Approvals and w/fs dont always work together RT @keith #spsnyc #sharepoint Pitfalls, Difficult to change list Workflows Front End Empty Field values Cannot copy and paste between steps RT @keith #spsnyc #sharepoint WF Should not be haphazard, No such thing as a simple workflow RT @keith #spsnyc #sharepoint SPD is for the Power user not business user. IT needs to govern the workflows and have a policy and ownership RT @keith #spsnyc #sharepoint OUt of the Box SPD Workflows Custom Development in VS or third party (K2) RT @keith #spsnyc #sharepointInformal Process=Informal results Workflows formalize a process RT @keith #spsnyc #sharepointWhen does SPD run out of gas? Need to look at complexity of workflows in large organizations RT @gvaro @scottsingleton: #spsnyc #sharepoint element manifest files (content types, list definitions, etc.) RT @gvaro @scottsingleton: #spsnyc #sharepoint The Element Manifest file is the real meat and potatoes of a feature. RT @gvaro @scottsingleton: #spsnyc #sharepoint Only thing a manifest file does, is tell SharePoint where the files go (the WSP manifest). RT @gvaro @scottsingleton: #spsnyc #sharepoint .webpart files can support more than 1 web part definition per file RT @gvaro @scottsingleton: #spsnyc #sharepoint .DWP file is '03 version .WebPart is an ASP.NET web part definition file RT @gvaro @scottsingleton: DWPFiles region - defines web part definitions file. (.dwp, .webpart)

SharePoint Saturday NYC - Live coverage link

If you were not fortunate enough to attend SharePoint Saturday NYC, you can still follow what's happening there and also get latest news and views from different sessions. Here is the link: http://www.endusersharepoint.com/blog/wp-content/uploads/2009/09/2009-09-12-SPSNYC-LiveStream-5Columns.htm Live stream: http://www.ustream.tv/channel/spsnyc You can also follow them on twitter @ #spsnyc

Friday, September 11, 2009

Dialogs and ViewModel - Using Tasks as a Pattern

Microsoft creates the CodePlex foundation

Uncustomized vs customized pages in SharePoint

Building Records Management Solutions with SharePoint (by Spence Harber)

A new article has been published on MSDN. http://msdn.microsoft.com/en-us/library/ee364741.aspx It's written by a SharePoint MVP Spence Harber. It's a very detailed article and comes with demo code. Check it out!

Announcing the Fourth Release of the Microsoft SharePoint Administration Toolkit (SharePoint Team Blog)

Validating contact selector control

Question (asked by a forum user): I have a Contact Selector control in a repeating table in a browser form. How do I validate that there's something in the Contact Selector control? Suggested Solution: First, how can you validate contact selector control? Here is the solution: Private int Validate() { XPathNavigator ContactSelectorField = this.CreateNavigator().SelectSingleNode(XPATH of Contact Selector, this.NamespaceManager); if (ContactSelectorField.SelectChildren(XPathNodeType.Element).Count == 0) { returnValue = 0; } else if (ContactSelectorField.SelectChildren(XPathNodeType.Element).Count > 0) { ContactSelectorField = ContactSelectorField.SelectSingleNode("my:Person", this.NamespaceManager); if (string.IsNullOrEmpty(ContactSelectorField.SelectSingleNode("my:DisplayName").Value.Trim()) || string.IsNullOrEmpty(ContactSelectorField.SelectSingleNode("my:AccountId").Value.Trim()) || string.IsNullOrEmpty(ContactSelectorField.SelectSingleNode("my:AccountType").Value.Trim())) { returnValue = 0; } } } In a repeating table, you can iterate through all items and validate the control. I mean it depends on your actual requirements. This is just a hint. Please use your own judgement. XPathNavigator docNavigator = this.CreateNavigator(); XPathNodeIterator nodeIterator = docNavigator.Select("/my:myFields/my:group/my:repeatingGroup", this.NamespaceManager); bool Status = true; for (int i = 0; i < nodeIterator.Count; i++) { string strItemXPath = "/my:myFields/my:group/my:repeatingGroup[" + (i + 1) + "]" + "/my:" Status = Validate(strItemXPath); //See modified Validate function below } Private int Validate(string path) { XPathNavigator ContactSelectorField = this.CreateNavigator().SelectSingleNode(path + "contactSelector", this.NamespaceManager); //contactSelector is the name of the contact selector control. if (ContactSelectorField.SelectChildren(XPathNodeType.Element).Count == 0) { returnValue = 0; } else if (ContactSelectorField.SelectChildren(XPathNodeType.Element).Count > 0) { ContactSelectorField = ContactSelectorField.SelectSingleNode("my:Person", this.NamespaceManager); if (string.IsNullOrEmpty(ContactSelectorField.SelectSingleNode("my:DisplayName").Value.Trim()) || string.IsNullOrEmpty(ContactSelectorField.SelectSingleNode("my:AccountId").Value.Trim()) || string.IsNullOrEmpty(ContactSelectorField.SelectSingleNode("my:AccountType").Value.Trim())) { returnValue = 0; } } } This is off the top of my head. You may have to tweak it before trying it.

Creating list definition for a SharePoint list

Setting expiration date in a content type policy

Copying InfoPath attachments from one section to another

http://walisystems.com/articles/SPS/infoattach/CopyingFileAttachments.htm Get code to copy attachments programmatically from one section in the form to another. Article gives a practical scenario and a solution to resolve the problem. Properties of file attachment control can be set at design time only. How can you restrict users from deleting the file after he has uploaded it and the form has been submitted? Read the article to learn how!

InfoPath 2007: Working with radio buttons and checkboxes

http://walisystems.com/articles/SPS/radiobtns/Infopathradiobuttons.htm See how you can hide sections and control checkboxes by selecting radio options. Learn what not to miss when setting conditional formatting and defining rules.

SharePoint 2010 sneak peek

http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx If you haven't seen this link yet, go check it out. You will get to know what SharePoint 2010 has to offer. Here is another link: http://blogs.msdn.com/arpans/archive/2009/08/19/sharepoint-2010-sneak-peek-presentation.aspx Enjoy!

Capacity planning for InfoPath Forms Services

http://technet.microsoft.com/en-us/library/cc879113.aspx I believe this document should have been released early. Performance and quality for InfoPath forms are two issues that are as important as they are for SharePoint. If you have ever developed browser-enabled forms, you'll agree that creating large forms has some performance issues. Considering performace when designing forms is important. Capacity planning is equally important. Lot of effort goes into developing a large InfoPath form and without planning, your effort will either go waste or will not be appreciated by users.

InfoPath 2010 feature videos

Thursday, September 10, 2009

Building forms with InfoPath 2010

http://www.youtube.com/watch?v=VKJ3A12RfE8

InfoPath 2010 Overview Video

http://blogs.msdn.com/infopath/archive/2009/08/25/infopath-2010-overview-video.aspx

Select file was not found" error

I blogged about it long time ago but lost that post in a server crash. This error occurs when you try to attach a file in InfoPath task form. There are several solutions. One is as following: Open WrkTaskIP.aspx from the following location: C:\Program File\Common Files\Microsoft Shared\web server extensions\12\Template\Layouts Locate following tag: <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> Insert following line before the end tag "</asp:Content>": <script type="text/javascript">aspnetForm.encoding = "multipart/form-data";</script>

Select file was not found"

Select file was not found"

What's new in InfoPath 2010

Tuesday, August 4, 2009

RequireClientRenderingOnNew

A user posted a problem in the newsgroup for which he himself suggested a solution that worked for him. I thought I would post it here. Some one will find it useful.
Problem: InfoPath form should inherit from a base content type. If a form is deployed using standard publishing functionality, InfoPath inherits from the correct content type but when the form is deployed through a feature, the form opens in the client and not in the browser.
Suggested Solution: Content type has a property called "RequireClientRenderingOnNew" which is set to true by default. If you set it to false, the problem will be resolved.

Thursday, July 23, 2009

Generating proxy with svcutil.exe

svcutil /t:code http://webserviceURL /out:proxy.cs /config:configuration.config
Copy contents from configuration.config to the config file of your application.
svcutil.exe is located in C:Program FilesMicrosoft SDKsWindowsv6.0ABin folder . This is the default path if you did not change the installation path during installation.

Saturday, June 27, 2009

One of more field types are not installed properly

Here is another small tip. If you get the following error, change the field name that you are using in your SPQuery to the "internal" field name and that should resovle your issue.
One of more field types are not installed properly
Well, I won't go into details as this is not a new topic and has been discussed several times on different blogs and forums but why I wanted to post this tip again was the reason that I have seen on different blogs where authors have mentioned that internal names should be used if there are spaces in the field name. That means if there are no spaces in the field name and you use the field name in the SPQuery, you shouldnt get this error. Right? That might work on your development machine but as soon as you move the solution to the staging or production environment, you start seeing this error and then you start scratching your head that there is nothing wrong with the query and you have already tested it in DEV environment then what is the cause of the error on other servers. You start fiddling with your database and other code that has no relationship whatsoever with the query code. So, the suggestion is to use the internal name in first place. That will work everywhere, on your DEV and also on staging and prod. You can use field.InternalName to get the internal name of the field where field is an SPField object. You can also use free tools like U2U CAML Builder to get the internal names of the fields. One last thing, I have often seen blogs where authors mention that simply replacing the space with  _x0020_ will resolve the issue. the authors have also given the code that shows how you can replace space character with _x0020_ but again that might work in your DEV environment but not necessarily on prod servers. For example, following is the name of one field in my list:
fc5bb16d_x002d_5336_x002d_45a6_x002d_b6e5_x002d_0c9e8de73e26
The real field name is "CurrentActivityStatus". Note there are no spaces in this field name so I shall assume it will be safe to use this name in the code but no, you will get the error if you did not use the internal name.
Comments/feedback welcome!
Update:
Someone asked me how to get the internal name using code. Here iit is:
list.Fields[FIELD DISPLAY NAME].InternalName.ToString()
Here list is an instance of SPList object.

Thursday, June 25, 2009

Reports: Michael Jackson dies at the age of 50

Reports say Michael Jackson has died after suffering a cardiac arrest. He was 50. It is indeed a very sad news. He was the king. I was a big fan of him.

Create a visual studio template for InfoPath

If your jobs is to design InfoPath forms on a regular basis, it will be a good idea for you to create a visual studio template. Add basic code like validation functions, etc and basic layout with common fields and save it as a template. You can use this template to create new InfoPath projects. New projects will have all the basic fields, layout and common functions and it will save you lot of time. To create the template, create a new visual studio project for InfoPath. Design layout and add code. That's the easy part that you might have already known. Now, to create the template, go to "File" menu and select "Export Template".  If you don't see that option, you may have to reset the visual studio settings.
To do that, click cancel to close the "Export Wizard" and go to "Tools" menu and select "Import and Export Settings...".
You will be shown "Import and Export Settings Wizard". Select "Reset all settings" and click "Next".
Select option "No, just reset settings, overwriting my current settings" and click "Next".
From the list shown, select your appropriate environment. For example, if you are creating a template that has C# code and will be used for C# projects, select "Visual C# Development Settings". Likewise, for VB, you can select the VB development settings. Click "Finish"
Now go to "File" menu again and select "Export Template" option. If it still doesn't work, close and re-open visual studio.
Select "Project Template" and click "Next". If your solution has more than 1 project. The drop down at the bottom will show all the projects that are part of the solution and you will have to select one.
On the next screen, you can select icon, template name, template description, etc. Choose the output location and click "Finish".
The wizard will create a zip file that will contain all the necessary files required to create a new project.
Copy this zip file to the following folder on your development machine:
C:Documents and Settings[Current User]My DocumentsVisual Studio 2005TemplatesProjectTemplatesVisual C#
If it's a VB template, copy it to the "Visual Basic" folder.
Now, open visual studio, and in new project wizard, select project type "Visual C#" (OR Visual Basic if you created a VB template). The new template will appear under "My Templates". Select the template, change it's name and location and click "OK" to create the project.





Error: InfoPath cannot save the following form: Template1

I got this error when I was converting an InfoPath form (XSN) to a Visual Studio project. To create a visual studio project out of an XSN template, create an InfoPath project in Visual Studio. Rename the .XSN to .CAB and unzip the .cab file using any zip/unzip utility. Copy all the unzipped files to "InfoPath Form Template" folder in your new Visual Studio project. That's it. You get the error when you make changes to manifest.xsf and try to save them. To get rid of the error, make sure the files you copied to the project are not read-only. Remove the read-ony atribute if they are read-only. Second, open the manifest.xsf in notepad and remove the old paths from the file. Locate attribute "publishurl" in the file and clear it's value. It points to an old publish location which might not be available in your current environment.  Then, locate "runtimeCompatibilityURL" attribute and change it's value to your current server URL The URL should point to the formservices.asmx. The URL will be something like http://sharepointserver/_vti_bin/FormsServices.asmx. Save the file. Close and re-open your visual studio project. Now you can save the changes.

Monday, June 1, 2009

Tip: Don't use "&" in instance.xml when creating a WSP

Here is a small tip for you. If you get a parsing error when deploying a WSP for one of your SharePoint lists and the list has data that uses "&", replace it with "&amp;". to get rid of the error. For example:
<Field Name="IceCream">Ben & Jerry</Field>
List with this data will not deploy. Use the following:
<Field Name="IceCream">Ben &amp; Jerry</Field>

Wednesday, May 20, 2009

Small SPQuery tip (How to get rid of "Cannot complete this action" error)

You try to run an SPQuery and get a "Cannot complete this action" error. I have seen users who think it's a permissions issue and they try to use elevatedprivileges. Remember, if you get this error when running an SPQuery object,the first thing you should look for is the query itself.  Because of a small semantical mistake the query will not run and SharePoint will throw this error. These mistakes are often difficult to locate with eye. I'd suggest use a tool, such as U2U CAML builder, to construct queries. Here is an example:
 string sQuery =
                   "<BR /><Where>" +
                    "<And>" +
                      "<Eq>" +
                         "<FieldRef Name='Title' />" +
                         "<Value Type='Text'>" + sDocumentName.ToString().Trim() + "</Value>" +
                      "</Eq>" +
                      "<Eq>" +
                      "<FieldRef Name='fc5bb16d_x002d_5336_x002d_45a6_x002d_b6e5_x002d_0c9e8de73e26' />" +
                         "<Value Type='Text'>" + sActivity + "</Value>" +
                      "</Eq>" +
                    "</And" +
                   "</Where>";
This query looks fine when you see it and it should run but it won't run because it has a small error.  If you notice the closing AND tag, you'll the closing angular bracket is missing. The query will compile but SharePoint will throw an error. The "</And" should have been "</And>".


Friday, May 1, 2009

FAST and SharePoint

This blog post contains good information about SharePoint and FAST. True, there are not many blogs (developer's perspective) at the moment that are discussing this topic but it's gonna be a popular topic very soon (6th sense?).

Thursday, April 30, 2009

SharePoint Saturday DC: Live Blogging

Hi Friends,
April 30 - 11:10 AM: I will be at the SharePoint Saturday DC on May 2nd. I will do live blogging and will try to cover as  many sessions as possible. I have setup a flickr account for this event:
In the window below, you will see live commentry, comments from readers and poll questions. If you have any comments, feel free to write to me. If you want me to cover any particular sessions, let me know. The list of sessions is available at: http://www.sharepointsaturday.org/dc

Note: I will be blogging live, excuse lapses of grammar, spelling errors, and typos. 



April 30 - 11:51 AM: Just noticed that sharepointblogs.com does not support iFrame in a blog post. The live commentry window does not appear in this post. I have setup a new page for the live blog. URL is as following:
Or If you prefer, you can open a new window (pop-up) that will show commentry directly on the host site:
Click Here to open a new window.
Thanks,
Saif
 Update: May 2, 2009 - 10:46 PM: It was a wonderful day. I enjoyed excellent sessions and met interesting people. The crowd was simply awesome. Met Joel Oleson, Paul Galvin, Mark Miller, Dux Raymond Sy, Michael Lotter,  Chad Scroeder, Sahil Malik, Becky Isserman amongst others.  I simultaneously blogged on two sites. I had already sent an invite to my user group members and later came to know that Mark Miller had also arranged a live blogging event. So I blogged for both, my site and Mark Miller's endusersharepoint.com. Also, remained active on twitter. I have posted pictures on flickr (See URL above). To view live blog visit following sites:
I will post a detailed event report tomorrow. Well, I will definitely try to write something but not sure. We will see tomorrow! It's good night from me. Thanks to Dux Raymond Sy and Reah Sy, who did an excellent job of organizing the event. Thank you guys!
-Saif

Thursday, March 12, 2009

Explorer view in big libraries does not load

Explorer view in big libraries, that have huge number of documents, does not load. It gives you following error:

After some time, you get the following network error:


Tuesday, March 10, 2009

Error: File not found

File not found
I got this error second time in two months so I thought I would share my experience with the readers. As you may know, there could be several reasons for this error. If you google internet for this specific SharePoint error, you will find a couple of posts discussing the issue:
As you will notice in the above two posts, in both cases the cause of the error was different. In one case, it was related to web part. In other case, it was related to a misplaced CSS file. In my case, the problem was due to low disk space in system drive. Interesting? I checked IIS, sites were running. Checked DB! Databases were up! I created and tested a WSP on my server before the error appeared on my server. I retracted and deleted the WSP although I was sure it had nothing to do with the error. Then I noticed, my server was performing slow. Checked processes, they were ok. Checked for virus. No virus found! In the end, I noticed the server was slow because it had run out of space on system drive. I freed up some space and SharePoint sites started working. I thought I would share this with my blog readers. If you see this error next time, don't forget to check space on your system drive.

10 Best Practices For Building SharePoint Solutions

Some tips about writing testable code and deploying SharePoint solutions!

MVP Renewed for another year!

Just got an email from Microsoft that my MVP award has been renewed for another year.  Congrats to everyone who got renewed and to all the new MVPs!

Saturday, February 21, 2009

InfoPath Tip: Managing older versions


InfoPath Tip: Managing older versions
Here is a small tip to manage older versions of InfoPath forms. This is a very simple tip and the solution is available out-of-the-box but unfortunately, InfoPath developers usually ignore this built-in feature and face problems after deploying the updated forms. You may have noticed that you get "Schema validation errors found" when opening an updated form. In fact, the form fails to open and it is difficult to locate the data sources that cause the problem. This question is asked frequently in the forums where users ask for solutions to fix the problem. Some users manually upgrade the XML of existing forms to make them compatible with the new template.

In the "Form Options", inside "Versioning" category, there is an option to manage version upgrades.



The drop down has three options:

> Do nothing (existing forms might not work properly)
> Automatically upgrade existing forms
> Use custom event

By default, the first option "Do nothing ..." is selected. Select the second option "Automatically upgrade existing forms" and save changes. Publish your form. This will automatically upgrade the existing forms and you won't have to update their XML manually which can be quite cumbersome if the library contains hundreds or thousands of forms which is a common scenario in big companies. Some times, it is necessary to keep the existing forms as they are and upgrade them manually if need be but that is rare.

User can also take advantage of "Use custom event" option. This will add an event handler to the form where you can add your own custom code but this will be useful only if you know what changes you had made in the form. You can read more about it at http://msdn.microsoft.com/en-us/library/microsoft.office.infopath.formevents.versionupgrade.aspx.

For example, you can check the version number of the form being opened and the version number of the template and if the form's version is older than the template's version then you can use custom code to handle the situation. For example, the following will give you the version numbers:

public void FormEvents_VersionUpgrade(object sender, VersionUpgradeEventArgs e)
{
string formVersion = e.DocumentVersion;
string templateVersion = e.FormTemplateVersion;

//comparison code here
//if versions are different then do something


}

Another option is to add checks in the form using code. Suppose you added a new data source in the form. This data source will not be available in the forms based on the older template. You can check for the existence of the data source/node programmatically and handle business logic accordingly. For example, here is some sample code:

XPathNavigator node = this.CreateNavigator().SelectSingleNode("/my:myFields/my:newNode", this.NamespaceManager);
if (node != null) //if this node exists
{
   //Logic 1
}
else
{
   //Logic 2
}

node = null;

You simplly check the existence of the data source by comparing it to "null". If it's not null (node exists), run new logic for the new form else skip the new logic to keep the old forms intact.