Duplicate Entries in ViewLsts.aspx SharePoint


SharePoint allows you to create custom list definitions and deploy them as Features.  Here are a couple of blog entries that talk about the steps you will need to take to create a custom list definition

http://www.andrewconnell.com/blog/archive/2009/02/08/A-Quicker-Way-to-Create-Custom-SharePoint-List-Templates.aspx

http://stackoverflow.com/questions/441252/in-sharepoint-what-is-the-easiest-way-to-create-a-custom-list-schema-xml-file

However when following these instructions, I noticed that my custom lists were appearing twice in the ViewLsts.aspx page

 

image

After hours of debugging I found the cause of this issue.  In your list definition file, confirm that you have only one view with the “DEFAULTVIEW=TRUE” attribute set.  If you have multiple views with this attribute set, you will see an entry in the ViewLsts.aspx page for each view that you have specified as the Default.

Removing this attribute and re-activating the feature helped fix this issue

Retrieving Items from a SharePoint List with subfolders using CAML Filtering


When you run a CAML query to retrieve items from a SharePoint list, make sure that your CAML query tag does not include the <Query></Query> tags.  When you include this tag, the filters are disregarded and you will retrieve the entire list
e.g.
A caml query like this
<Query>
<Where>
<Eq>
<FieldRef Name=’Title’>
<Value Type=’Text>Title.xml</Value>
</Query>
Will not retrieve the list item.
Remove the <Query></Query> tags and you should be able to retrieve the results according to the filter specified.
Here is a sample

 image

Consuming External Content Types(BCS) in InfoPath Forms


Business Connectivity Services(BCS) is one of the coolest features in SharePoint 2010.  BCS helps us connect to Line of Business applications without writing a single line of code.

In this article, we will explore the process to connect to BCS and use the information within an InfoPath form.  A business scenario would go something like this

“You need to create a Expense Report form.  Users entering expenses will need to pick a valid project from your Line of Business system within the InfoPath form”

Check out these articles on how to create the BCS model and connect to your Line of Business system

Tobias’s Article on BCS

Now that you have a BCS system, lets display those fields within an InfoPath form

In my example, I have a simple SQL Table with a list of projects as shown below

image

We need to build an InfoPath form where users can pick one of the projects from this list.

My external content type in SharePoint Designer looks like this below

image

Notice the following properties ‘coz you will need them when you build your form in InfoPath

Name, Namespace, External System

Open up InfoPath 2010 and design a blank form

In the Home Tab, Under the Controls section choose the External Item Picker option under the input sub section and add it to the form

image

InfoPath will add a new group to the data fields with some properties.

Add the Field to the InfoPath form, right click and pull up the Properties for the external Item Picker

image

Enter the Namespace of your ECT , Name of the ECT and the System Instance Name(in our case it is CRM) into the required fields. <edit>Enter the Display Name of your field, otherwise you would only the see the identifier when you preview the form..</edit>

Note: After two hours of frustration, I found this to help finding information about the system instance name.  There is no help for the required fields and at first I couldnt figure out what the “System Instance Name” was.  Is it the name of the Finder ? Is it the name of the Entity? .   A search on MSDN retrieved the following article

MSDN System Instance Article

The System Instance name is a property of the SPBusinessDataField.  So to find out the property, I added the same field to a custom list and wrote some code as follows to retrieve the System Instance Name

image

The system Instance name was the same name as the external system property in SharePoint Designer.

Click the Other Settings tab in Infopath and set the following properties.  Check the “Refresh on Open” option and select the dropdown for the picker mode to “Connect to external data through SharePoint”

image

Click Ok and Hit Form Preview. Now you can search for content in your LOB and surface them through InfoPath.  We will discuss saving this data to SharePoint in another post.

image

Creating a Custom Theme for SharePoint 2010 using PowerPoint


One of the neat little features in SharePoint 2010 is the ability to leverage your organization’s PowerPoint slide to create the look and feel for your SharePoint sites

With MOSS 2007, you had to adhere to a Corporate Style Guide and design your CSS themes manually. 

With 2010 you can leverage any existing Marketing Collateral that you might have and import those styles into SharePoint.

Here is a default SharePoint 2010 site

image

If you are using PowerPoint 2010, open up any PowerPoint slide and goto the BackStage and click Save As and choose “Office Theme” as your File Type Option.  Give an appropriate name for your theme, since your users will be using this name to identify the theme within the theme gallery

image

Now that you have saved your theme, Goto Site Settings and goto the Themes gallery and upload your newly created Office Theme

image

Your custom theme should now be available for your sites.

SharePoint 2010 Install & Powershell Issue on Windows Server 2008


PowerShell is an optional component available with the Windows Server 2008 default install.  If you enable this feature in Server Manager you will run into an issue when installing the pre-release version of SharePoint 2010.  2010 depends on the PowerShell CTP3 which cannot be installed without uninstalling the inbuilt PowerShell feature. 

To Uninstall PowerShell.  goto Server Manager and uncheck the PowerShell feature.

Now your 2010 install should proceed without any issues

Check this post below to review and download the various versions of Powershell

http://blogs.msdn.com/powershell/pages/download-windows-powershell.aspx

Getting Ready for SharePoint 2010


Last month at the SharePoint conference in Las Vegas, Microsoft unveiled the feature set and hardware requirements for SharePoint 2010.  2010 requires 64 bit hardware and that might mean a significant re-platforming of your existing developer machines.  With MOSS 2007 developers were free to run a test environment on their 32 bit machines using Virtual PC.  Bamboo Solutions even came up with an innovative solution to run MOSS 2007 locally on Vista machines

MOSS on Vista

However, If you are a SharePoint developer and you currently have a 32 bit machine, there are some significant changes coming down the road.

First, if you can, move on to a 64 bit platform.  Irrespective of whatever OS you run(Windows 7 , Vista or Windows Server 2008) moving to a 64 bit platform provides you the flexibility to run 64-bit 2010 Virtual machines natively using Hyper-V or VMWare Server or Virtual Box

If you are running Windows 7 and do not want to deal with VMs, there is an interesting option called “Boot from VHD” in Windows 7.  With this option,  you could boot directly into a Windows 7 or Windows Server 2008 test environment VHD and hence leverage all of your system resources within the VHD.  Here is a great post that talks about the steps to prepare a VHD and boot from it.

http://blogs.technet.com/aviraj/archive/2009/01/18/windows-7-boot-from-vhd-first-impression-part-2.aspx

If you are stuck with a 32 bit machine and you are not part of a hardware refresh cycle, you have one option.  If your machine has a Intel/AMD chipset that supports virtualization, make sure to update your BIOS by visiting the manufacturer’s website.  Once your BIOS is updated, you should see an option to turn on Virtualization within your BIOS setup.  After turning on virtualization within the BIOS, you can run your 2010 VMs.  Currently,  VMWare Server 2.0 and Sun’s VirtualBox support running 64 bit guests on 32 bit hosts.   The performance of these VMs on 32 bit hosts leave a lot to be desired and is definitely not recommended for hard core SharePoint development.  You will be better off developing off of a Hyper-V or VMware Server hosting your VMs remotely.

SharePoint 2010 New Features


Microsoft has released a couple of sneak peek videos about SharePoint 2010 at http://www.microsoft.com/sharepoint

Here are some of my notes from these videos

Business Value

The SharePoint pie from MOSS 2007 has been changed for 2010.  Instead of focusing on generic portal topics, the focus is more on the business value of SharePoint.  Here is the new pie

New%202010%20Pie

Sites

Sites are all about sharing info with employees/partners/customers – empowering customers across all mediums
Team Sites, Internet Facing sites, extranets for customers and partners

Communities

Ad-Hoc Communities
Communities in terms of hierarchy (comes from AD)
Communities now include Business Partners. You could search for users who are non-employees

Content

Collaboration Content
Line of Business Content
People Centric Content

Search

FAST Search is integrated into SharePoint
Highly scalable Search engine
Emphasis on getting the right results on the first page
Enhanced People Search
Enhanced Business Data Search

Insights

Combination of all the above
Microsoft’s vision is a decision engine that brings other tools into unison

Composites

Help rapidly create dynamic business solutions
End user applications
Business Processes
Tools and integration with SharePoint Designer, Visual Studio

New Features

  1. Ribbon inside SharePoint
  2. Customizable Ribbon
  3. Contextual
  4. Removable and users have the option to go back to the MOSS 2007 interface
  5. Asynchronous user interface – minimal postbacks
  6. Dialogs employ DHTML effects to gray the background and provide user dialogs

Functionality previously available under the Content and Structure pages are now available in the main library

Multi select documents to checkout /check -in/delete etc.

Customization Capabilities

  1. Page edits are called Web-Edits – This replaces the Site Text and font etc.
  2. Live Preview of fonts/colors etc, similar to Office 2007
  3. Upload and modify Images directly instead of uploading first to a image library
  4. Picture Tools provide Resizing of pictures directly using the picture
  5. Changing styles like having borders etc. for images

SilverLight

  1. Add SilverLight web parts without additional configuration
  2. Just point the web part to a XAP file in a document library
    Interactive zoom is available on SilverLight web parts

Theming

  1. You can theme SharePoint using the same theme as PowerPoint
  2. e.g Upload a Powerpoint theme
    Choose the theme and apply it to the site
    Now the site looks like the Powerpoint slide
    You can preview a theme on the site before applying it
  3. Firefox is fully supported and can do the same things as IE
  4. Completely redesigned Sharepoint Designer with Ribbon

Visio Services

  1. Visio can connect to backend and visualize the data
  2. Can publish visio into SharePoint and can render them without the need for visio on the client (similar to Excel Services)
  3. This functionality is called Visio Services
  4. Can zoom in and zoom out of diagrams
  5. Needs a good Visio design first for Business processes

BDC is now Business Connectivity Services

  1. Can take LOB data offline using SharePoint workspace Manager(previously Groove)
  2. Tools in SPD and VS for modeling LOB entities
  3. External data are called Entities – they live in BCS and you can work with them in SPD
  4. External Content types based on these LOB entities can be created within SPD
  5. There is a browser within SPD which can browse SQL Databases and provide views/stored procs etc.
  6. You can right click on an entity and create CRUD operations on it using a simple wizard and publish from SPD
  7. External data gets converted to a list like view
  8. Users can filter and sort BCS data and work with it like they would with a SharePoint list
  9. Users can seamlessly update data in 2010, which will automatically update the LOB system
  10. You can create a Word template with BDC elements and publish to a library. When the user creates a new document they can pick those BCS entities within Office
  11. To take items offline use Groove – SharePoint workspace manager – Click on Sync to Computer
  12. Lists/Libraries are all synced
  13. LOB data flows offline in Groove
  14. Can edit LOB data when offline and sync back when connected

Whats New for Developers

  1. Visual Studio 2010  has Visual Web part Designer. No more building tables for layout. You can drag and drop and create controls within web parts, similar to ASP.NET forms
  2. Developer Dashboard – can allow any page to provide debug info
  3. LINQ for SharePoint has been released and allows developers to use LINQ objects to query SharePoint lists
  4. Client Object Model – can run code on the client using JS/.NET.  This is especially useful when building Silverlight applications
  5. Supports TFS , automated builds
  6. New Project Templates are available in Visual Studio 2010
  7. Comes with a SharePoint Server Explorer within VS
  8. Can lookup Sites/Lists etc. as just like SQL Explorer in visual studio
  9. Can automate post deployment tasks – no more post deploy batch files required, UI to specify deployment steps
  10. There is a BDC explorer within VS to explore LOB data from within VS
  11. Visual Web part project comes with Features and Packages automatically.  Complete drag and drop functionality to visually build a web part
  12. SilverLight can use Client Object Model to access list data using Microsoft.SharePoint.Client namespace
  13. Runs CAML queries asynch and provides a rich client side object model to access data

Whats New for Administrators

  1. New SharePoint best practices analyzer – Comes with a set of pre-built rules , You can build your own rule if you need. It can automatically correct issues provided you set it up to do so
  2. New Central Admin Console look and feel.  Items are grouped differently compared to the 2007 version
  3. New Backup and Restore Tools in the UI
  4. Visual Upgrade option – Can upgrade 2007 to 2010 and keep the old layout and customizations
  5. New SQL Logging Database – Developers can write code to log to this SQL database ,  Can write your own events into the logging database, Whole bunch of out of the box reports for logging
  6. Scalable List infrastructure –  Can control how many items get returned from a list , Can set happy hour deadlines to filter the number of items in a list based on time of day
  7. Unattached Content DB recovery – If you need to recover sites/lists from a DB backup you can do so without restoring it onto a temporary site. You can also – Browse content, Backup the site ,  Export site and all of this without restoring it onto a site
  8. Upgrade looks and feels like 2007  – Can preview the new look and feel and revert back to the old version

6 Things that you think will work in SharePoint but doesnt


  1. When you have a Gantt view of the Task List, Web part connections are unavailable.  Hence you cant filter a Gantt View using the Filter Web Parts
  2. DateTime columns cannot be used for Grouping in the Content Query Web Part out of the box
  3. You cannot use the PortalSiteMapProvider to retrieve Navigation items from another site collection
  4. If you have a Date Column in a List, it cannot be used as a Lookup Column on another List
  5. If you activate a Feature on a site and then save it as a Site template and create a new site from this template, the FeatureActivated code doesnt fire
  6. You cannot write back to a List from Excel 2007.  This was available in Excel 2003. You will need Access for writing back to a List from Office (Update: Refer to WorkerThread’s link below for an add-in)

If you have any more of these oddities, please post in the comments and I will update this list

Edit: When you use the Content Migration APIs to copy lists and libraries from one farm to another, person fields do not copy over correctly

Create Publishing Pages on custom Document Libraries in SharePoint


Have you ever wanted to create pages in your custom document libraries in MOSS 2007 ?

When you click on Create Page under Site Actions, it always defaults to the Pages library. Well not any more.

Here is a great post on how to work around that limitation.

http://blogs.msdn.com/syedi/archive/2008/07/18/why-should-one-save-publishing-pages-in-pages-list-always-in-moss-bend-it.aspx

Some things to note after making these changes

  1. Import the Microsoft.SharePoint.Publishing namespace in your custom page
  2. Enable the Page Content Type for the document library for it to show up in the dropdown list

Office 2007 Integration with SharePoint


One of the frequent questions we encounter from our customers is

“Why do I need Office 2007 and how does it integrate with MOSS 2007”

Here is a great post on the  integration of the different Office applications with SharePoint

http://blogs.msdn.com/brittog/archive/2007/02/16/wht-you-get-with-office-2007.aspx

%d bloggers like this: