Tags: , , | Categories: Tips and Tricks Posted by BPOS-Tutor on 7/2/2011 12:29 AM | Comments (0)

Phil Childs over at http://get-spscripts.com/  has some great content on SharePoint PowerShell scripting.  Most recently I used an example he had for removing pesky SharePoint 2010 columns which can't be removed from content types through the UI!

Props to Phil for writing such a great blog and publishing it out to the community!

 

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
Tags: , | Categories: Tips and Tricks Posted by BPOS-Tutor on 4/22/2011 9:21 AM | Comments (0)

Scenario: 

You have a Feature that attaches an event receiver to a given content type.  That content type is created and syndicated via SharePoint 2010's content type hub.  You want to understand the process for deploying or updating it across subscribing site collections.

Deployment Procedure:

1. Deploy event receiver feature to farm (add solution, deploy solution)

2. Active feature on Content Type Hub site.

3. Modify the publishing status of the content type which your event receiver is attached to.  Publish or Re-publish the content type.  Do not run the Content Type Hub job or the Content Type Subscriber jobs yet.  If they are running within a very short interval turn down the frequency to every 30 minutes (important!).

4. Activate the feature on all the subscribing site collections.

5. Run the content type hub timer job.  Wait until the job finishes.  Run the content type subscriber job for all the web applications where this feature will live.

6. Open your subscribing site collections in SharePoint Manager (SPM on CodePlex).  Verify that in each library where your content type lives you see the event receiver attached.

Pre-pare for Update / Removal Procedure:

1. Go the Content Type Hub Site.  De-activate Feature.

2. Update Publishing Status for Content Types.

3. Run content type hub and subscriber jobs.

4. De-activate Feature on subscriber sites.

5. Retract solution.

6. Remove Solution.

7. Check libraries with SPM to ensure that Event Receiver has been removed.

8. Delete manually if not removed.

9. If updating repeat previous steps for installation / deployment.

Good luck!

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
Tags: , | Categories: Tips and Tricks Posted by BPOS-Tutor on 3/25/2011 6:11 AM | Comments (0)

Situation to Avoid!

You're creating custom columns and content types in SharePoint 2010.  You might want to create the following columns

"Order Status" "Customer Number" "Ship Date" "Part No" "Invoice Number" "PO No"

Seems fairly straight forward right?  Well let me stop you there.  Warning Will Robinson.  Do not pass go. Do not collection $200. 

No Spaces!

What's wrong with a space you ask? Well think about how SharePoint might store your column names in SQL.  SharePoint deals with those spaces by inserting something between them.  For example "Order Status" might become "Order_0x200_Status" and if you had a crawled property it might be "ows_Order_0x200_Status".  When you start dealing with those columns programmatically it gets somewhat tricky to remember what's what. Which column is actually "Order Status". 

Now here's where things get hairy.  I've noticed that when your column values are supplied by Managed Metadata and you start to move documents programmatically through workflow or with the Content Organizer Rules... columns with spaces in their names are treated as second class citizens and your column values get truncated. Eeek. This leads to all types of problems with development and SharePoint search. 

Bottom Line!

If you absolutely, positively need spaces in your column names you should follow this two part naming process. 

1. Create your columns without spaces.

2. Go back and edit your column and change the name to include the space.

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList