Social
Tags

Entries in SharePoint (21)

Friday
Aug062010

SharePoint 2010 GlobalNavigationNodes Moved

This is a very short blog, but it appears that the GlobalNavigationNodes member on the PublishingWeb class has moved in SharePoint 2010.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.publishingweb.globalnavigationnodes(office.12).aspx

In SharePoint 2007, this was under Microsoft.SharePoint.Publishing.PublishingWeb.GlobalNavigationNodes

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalnavigation.globalnavigationnodes.aspx

In SP2010, this has moved under Microsoft.SharePoint.Publishing.PublishingWeb.Navigation.PortalNavigation.GlobalNavigationNodes

 

This particular property is used to read a publishing site's navigation settings - I've used this to export site navigation as XML to accompany a site export.  Since site exports doesn't seem to include any customized site navigation information.  (It still doesn't in SP2010).

 

Thursday
Jul152010

SharePoint 2010 - Update All List Items SharePoint Designer Workflow Action

Out of the box - SharePoint provides quite a few different Workflow Actions, but strangely missing was a Workflow action that can loop through and update all items within a list.

clip_image002

Figure: Update List Item (but only works with one item)

Further to my shock was that someone out there (cough Codeplex) hasn't written one yet. So last night I sat down and start to code.  There will be another article about coding and packaging a SharePoint Workflow Activity, but right now, I need to shove my baby out the door.

UPDATE LIST ITEMS v1.0 INSTALLATION

Everything in one WSP file: grab it here

The package includes 3 objects:

  • WorkflowActivity.dll - goes in the GAC
  • WorkflowActivity.ACTIONS - goes into <SharePointRoot>\TEMPLATE\1033\Workflow\WorkflowActivity.ACTIONS
  • <authorizedType> entry needed in Web.Config - I've included a Web Application feature that will do this

To activate the web application feature

clip_image004

 

UPDATE LIST ITEMS v1.0 USERS GUIDE

clip_image006

In SharePoint Designer, select the "Update All List Items" action from the menu

clip_image008

Or just do the inline typing

clip_image010

There is only 1 dialog for this action - I cheated and reuse the dialog from Update Item Workflow Action

clip_image012

Unfortunately, because I cheated and use Microsoft's dialog - it won't let us finish without specifying a List Item - hence I use the sentence "Update all items in this list (ignore list item)" - sorry - hope that was clear.

clip_image014

OK and trigger the workflow

clip_image016

 

SUMMARY NOTES

  1. In SharePoint, a workflow can not trigger itself. So even though I have the workflow set against this list - it is only run on the last item.
  2. And because this is version 1 (v1.0) there's some really complex looking code for setting "People or Group" values. So I'm not sure if this works 100% in my implementation.
  3. Obviously, if your list is extremely large you are on your own :-)
  4. One other scenario this opens up is the facility to have a site workflow "trigger" a second workflow set on a particular list (remember - workflow can't trigger itself).
Tuesday
Jul132010

SharePoint 2010 - Configuring List Item Permissions with Workflow

The client had a pretty "simple" situation where:

  1. We want to create a Request list where different people in the company can add requests, but assign it to a department.
  2. Once created, only members in that department has access to this request item

PERMISSION GROUPS

You can use Active Directory groups here as well.  Here are my four security groups

image

 

DEPARTMENT LIST

I plan to use re-usable workflows later to configure the list item permissions.  So I need to create a few site columns, here's the first one DepartmentGroup.  This is basically a People or Groups field.

clip_image002

I create a list for the department, thus:

clip_image002[7]

 

REQUEST LIST

Here's the second site column.  This is a lookup column to the Department list.  I'm bringing over the ID field as an additional field.

clip_image002[9]

Add a few records:

clip_image002[11]

clip_image002[13]

REMOVE LIST PERMISSIONS

Stop inheriting permissions from parent (site), and do a bit of house cleaning and remove the unnecessary groups.

 

LET'S WORK ON THAT WORKFLOW

The idea of the workflow is that:

  1. Whenever an item is updated
  2. Look up the group based on the selected Department (via the additional ID field)
  3. Assign item-level security to the list item
  4. Remove permissions to modify the item, and grant the department group permission to view and modify that request.

Create a re-usable workflow.  Target any content type.

We'll need the lookup site column, so associate that

clip_image002[15]

The permissions steps need to be run as impersonated steps.  The impersonated steps can not be mixed with the normal steps (such as Step 1)

clip_image002[17]

Remove (unused) Step 1, and add "Replace permission" action

clip_image002[19]

Start with the second parameter which is the easier one.  Click on "this list" and select Current Item

clip_image002[21]

clip_image002[23]

Click on "these permissions" and we want Contribute and Read permissions

clip_image002[25]

Click on "Choose" and set who we'll be granting Contribute/Read to

clip_image002[29]

Select "Workflow Lookup for a User…" and click Add
We want to do a look up on the Department list.

clip_image002[31]

The field we want is DepartmentGroup (our Person and Group site column).  Return the field as Login Name
Set the filter Field below to ID

clip_image002[33]

Set the filter Value field to Current Item.Department:ID

(You can also use the DepartmentLookup field here, just return it as Integer)

clip_image002[35]

Final result:

clip_image002[37]

OK everything.  Remember to save and publish

clip_image002[39]

 

Go back to SharePoint list

Configure the workflow and make sure it runs when a list item is created or modified

clip_image002[41]

VERIFY RESULTS
Check the permission of our first request (before the workflow)

clip_image002[43]

It is inheriting from list.  Nothing special.

clip_image002[45]

 

Create a new request for our Network department - see the workflow has completed

clip_image002[47]

Check its permissions

clip_image002[49]

"NetworkHeroes" has been assigned "Contribute" and "Read" permissions to the list item - everyone else has been stripped out.
The List Item has also stopped inheriting permissions from the parent list.

 

SUMMARY

So the solution works and is relatively elegant.  Though the client mocks me and says it was so much more easier in Lotus Notes :-(

The following features in SharePoint 2010 makes this example a little bit cleaner than with SharePoint 2007:

  • "Additional Fields"
  • Impersonation Step
  • Re-usable Workflows
  • Replace Permissions Action
Saturday
Jul102010

Silverlight PivotViewer and SharePoint

 

Microsoft just released a new control PivotViewer for Silverlight. 

http://www.microsoft.com/silverlight/pivotviewer/

If you haven't seen this yet - go check out the video then come back, I'll wait here.

 

It's a web-based control to provide pivot functionality for datasets.  For fixed data - you can pre-generate the data set. For dynamic data, the collection could be generated dynamically and served.

So what would happen if you throw it at SharePoint, I ask?

The initial results are astounding!  Check these out:

image

Figure: Connecting it to listdata.svc OData service

At the root level it really is quite boring.

 

image

Figure: Connecting to a document library OData service

OK this is getting fun.  Facets!  Sort/Display/Zoom

image

Figure: Sorting the document library by Modified date

You probably can see I've uploaded a bunch of documents in the last hour :-)

 

The screenshots don't do this justice - when you filter down, change sort… the boxes fly all over the place it's as if I'm literally shaking SharePoint apart to zoom in on my data.

 

So it looks like I'll be extremely busy next couple of weekends and evenings:

  • Generate collection data across site - this will let me filter the "Path" facet to select which list/document library I'm after
    • What does this mean for big sites?
  • Add more visualizers, use Word/PPT thumbnails
  • Create configurable background colours for different content types
  • Add a contextual menu and hook it back through SharePoint actions
  • And the Holy Grail - is it possible to make this work as a Sandbox Solution?
    • The current sample reference application requires IIS HttpHandlers to serve dynamic collection data consumed from OData. 
    • Sandbox solution problem may be tricky.

 

It's times like this I stood back and appreciate what Microsoft does.  You guys are awesome.  Different teams produce different software and they just magically work together.  Makes us look like heroes.

/Salute

Tuesday
Mar022010

SharePoint 2010 vs. 2007 comparison chart (ongoing effort)

 

This would be an on-going effort as I gather more details.  But at the moment I’m publishing what I have.

Different capabilities

 

2007
WSS3

2007
MOSS

2010
SP Foundation

2010
SP Standard

2010
SP Enterprise

Sites

         

Office Web Apps

     

X

X

User Experience

...

...

X
(ribbon)

X

X

Line of Business

 

X
(read-only)

X

X

X

Mobile Connectivity

...

...

X

(mobile dev enhancement)

X

X

Enterprise Management

...

...

(some reports)

X

(dev dashboards, monitors and self-checks)

X

(web analytics)

X

Tagging

   

X

X

X

Audience Targetting

 

...

X

X

X

           

Communities

         

Enterprise Social Network

 

...

 

X

X

Find People

 

...

...

X

X

My Site

 

...

 

X

X

Presence

 

X

...

X

X

Ask me...

     

X

X

Note board, recent activity

     

X

X

Enterprise Taxonomy

     

X

X

Community of interest / Tag Profile

     

X

X

Participation and Social feedback

     

X

X

Tag / Tag Cloud

     

X

X

Ratings

     

X

X

Navigation

     

X

X

Social Bookmarks

...
(add favourite)

...

...

X

X

           

Content

         

Compliance

     

X

X

Flexible Records Management

     

X

X

Shared Content Types

     

X

(enterprise content types)

X

Managed Metadata service

     

X

(indexed filtering)

X

Rich Media Content

     

X

X

Document Sets

     

X

X

Word Automation Service

     

X

X

Support for Accessibility Standards

     

X

X

Improved Alerts

 

...

X

X

X

Content Organizer

     

X

X

Document ID Service

     

X

X

Web Content improvements

   

X

X

X

           

Search

         

People Search

 

X

...

X

X

Windows Federated Search

   

X

X

X

Refinement

  (3rd party faceted-search)

X

X

X

Social behaviour improves relevance

     

X

X

Thumbnails, previews, and view in browser

     

X

X

Advanced content processing with strong linguistics

     

X

X

           

Insights

         

Business Connectivity Services

   

X

X

PerformancePoint Services

  X  

X

X

Excel Services

  X  

X

X

           
           
           
           

Composites

         

Client Object Model

   

X

X

X

List Improvements

   

X

X

X

Query Enhancements

   

X

X

X

Sandboxed Solutions

   

X

X

X

Silverlight Integration

   

X

X

X

Windows PowerShell

   

X

X

X

Workflow Improvements

...

...

X

X

X

InfoPath Form Services

  X  

X

X

Access Services

     

X

X

Site Templates

...

...

X

X

X

Synch Framework

   

X

X

X

 

Still to do:

1. add legend
2. add references / sources
3. link to specific details for some points
Let me know what you guys think:

Monday
Dec212009

SharePoint 2010 Speed, and Boot to VHD

Been pouring through all the new goodies in SharePoint 2010 like a kid opening his first Christmas present -
So much fun, so little time.

A few people have made the comment that SharePoint 2010 Public Beta runs pretty slowly for demo’s – here’re a few suggestions I’ve noticed that helps for me:

  1. You need more than 2GB of RAM for SharePoint on your demo machine. 
  2. Ideally, a generous amount of hard drive space

My setup has worked pretty well for me:

  1. Host is Win7 x64
  2. Created a VHD (virtual hard drive) with about 50GB allocated space. 
  3. Installed Windows 2008 R2, SQL Server 2008, SharePoint 2010 public beta, Office Web Apps, and Office 2010 client apps.
  4. Configure the VHD as a bootable device (new in Win7)
  5. On start of laptop, I get to choose to boot into Windows 2008 / SharePoint 2010 directly, which allocates all the laptop’s resources to the VM
  6. Oh – grab the ATI display drivers for DELL (see my previous post) to make sure Windows 2008 R2 can display via an external projector – ahead of the presentation.  (I nearly had a panic attack but got it all sorted before I had to go on stage).

The best part is when we move on from the public beta, I’ll just copy a new VHD over the same directory under Win7, then it’s all set.

Friday
May222009

SharePoint: MOSS SP2 Major Bug

The SharePoint Team blog announced a major bug with SharePoint MOSS SP2:

This is funny, but extremely serious and important.

During the installation of SP2, a product expiration date is improperly activated. This means SharePoint will expire as though it was a trial installation 180 days after SP2 is deployed. The activation of the expiration date will not affect the normal function of SharePoint up until the expiration date passes. Furthermore, product expiration 180 days after SP2 installation will not affect customer’s data, configuration or application code but will render SharePoint inaccessible for end-users.

http://blogs.msdn.com/sharepoint/archive/2009/05/21/attention-important-information-on-service-pack-2.aspx

  • Does not affect data
  • But it will silently deactivate after 180 days
  • Users can come to work without warning and SharePoint will be unavailable.
  • If you are installing SP2 - apply hot-fix from MSDN immediately afterwards.

Get the word out.

Thursday
May212009

SharePoint โ€“ InfoPath /cache clearall

So continuing my InfoPath self education.

  1. I publish a new version of the InfoPath form to the Forms Library
  2. I then create a new form based on this template
  3. In Browser – I see the new form
  4. In InfoPath – I see the old form

So it appears that InfoPath is caching the older version of my template and using that.

  • I clear the internet temporary files - didn't do it

A quick search lead me to this explanation: http://blogs.msdn.com/michael_yeager/archive/2008/07/09/infopath-cache.aspx

And sure enough,

start –> run –> InfoPath /cache clearall

Indeed clears out my cache, and now when I create a new form from SharePoint it is using the latest template

What befuddles me is that Michael Yeager says that InfoPath should be checking the version automatically so I don’t understand why it wasn’t doing that.

Here’s another more user-friendly way of removing a form from cache

File –> Fill out a form…

image

You can also "Get update of this form" from this dialog.

Thursday
May212009

SharePoint โ€“ InfoPath / Forms Library missing

Testing InfoPath, I try to do the simplest thing – publishing an InfoPath form to a SharePoint as a template, and allowing it to create a new library based on this template - I got this error:

The following computer running windows SharePoint Services does not contain the required InfoPath form template:
http://vm-spdev-xxxx/
A generic form template will be used instead

Warning: This is very bad

You should not continue – because if you do…

  1. InfoPath will create a new Document Library instead of a Forms Library and deploy the InfoPath file as a template in this document library. 
  2. It will appear as if everything’s working – you can do New –> InfoPath Form (as a document), fill it out and save it back to the list.
  3. And when you want to update the template it will complain that the default document isn’t based on a Form template.

    InfoPath failed to publish because the default content type in the document library is not based on the Form content type
  4. You got confused – you went to check the Library and sure enough it says the default content type is a Document
  5. You add a Form content type, and switch it over as the default content type… only to discover SharePoint now publishes two different sets of columns in this list – one set for Forms, another set for Documents.
  6. And it doesn’t appear as if the second publish worked…  I think this may be a different problem – because if I view as web page I see the new updated template

 

Instead, back out right now – delete that list in SharePoint and start over…  By the way… where’s – hmm where’s my Forms Library?

 

Went to site settings and activated:

  • Site Collection Features –> Office SharePoint Server Enterprise Site Collection features
  • Site Features –> Office SharePoint Server Enterprise Site features

No good, still no forms library.

More stumbling around, finally figured it out – I need to activate:

  • Site Features –> Team Collaboration Lists

Personally I didn’t think this was obvious – but I did know Forms Library is part of WSS…  so may be it made some sense.

 

Now go back to InfoPath again and try to publish.

Thursday
May212009

SharePoint โ€“ how do you stay on top of all this stuff?

SharePoint is a big product – and getting bigger.

People have wondered – how do you stay on top of all the new developments?

This is one trick I’ve found via Twitter – works relatively well.

  1. You will of course need a twitter account
  2. Go to the twitter search page and look for users.  Find “sharepoint”
    http://twitter.com/search/users?q=sharepoint&category=people&source=find_on_twitter
  3. You will see a bunch that comes up on top – sorted by # of followers:
    • sharepointbuzz is crazy – as far as I can tell – this re-twits anything anyone says about #sharepoint (that’s useful).  I followed for a bit and decided that was too much reading.
    • SharePointMVPs is a good one – basically this one twits whenever one of the SharePoint MVPs writes a new blog (or white paper) – HIGHLY recommended
    • SharePoint is the MS official one – not necessary if you are already following the SharePoint team blog RSS
  4. Read twitter on the go – in your iPhone or BlackBerry or Windows Mobile
  5. If you see a topic that’s interesting, flag it with “favourites”
  6. Review your twitter favourites a couple times a week.

Bingo!

Stay on top of all the up to date #SharePoint news

Anyone has a good tip about how to catch up on the old stuff between 2007 – 2009 let me know…