A Practical Guide to SharePoint 2013

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

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


InfoPath 2010 Overview Video


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