Showing posts with label SharePoint Migraton. Show all posts
Showing posts with label SharePoint Migraton. Show all posts

Thursday, April 9, 2015

SharePoint Migration and Administration Notification Tool

Scenario
  • You are performing an administrative change at the SharePoint site level or for all sub-sites starting at a particular location
    • Examples
      • Migration
      • Retention, Archival or Deletion
      • Redesign
      • User Acceptance Testing (UAT)
      • Upgrade
      • Restructure
      • Merge
  • You need to convey the administrative status to all users on the site
    • Likely as part of your SharePoint administrative communications plan
    Issue
    • There is no simple or easy out of the box way to accomplish this
    • We don't want to manually replicate notifications on each sub-site, modify the master pages, or configure content roll-ups on each site
    Solution
    • I developed the SharePoint Migration Notification Tool specifically for this purpose
      • Download SharePointMigrationNotification.wsp for deployment at the Site Collection level on a SharePoint on-premises farm
      • Add and Install the WSP file you downloaded
      • Enable the site collection feature named "Migration Notification" on each site collection
      • Add a list to the root site for each site collection.  Select the "Migration Notification URLs" list template (found under Blank & Custom list types)
        • You can name this whatever you like, but you should only have 1 of these lists at the site collection root because the tool uses the first one it finds
    • Here are some examples of the default notifications you can configure
      • You can also add your own custom notification messages

    • Here is the list configured at the Site Collection root level that defines your notifications
      • The new/edit item forms describe what should be entered in each field

    • Notification Tool Feature List
      • Site Collection Deployed full trust solution (Currently designed for SharePoint 2010+)
      • Client object model exclusively used for notification processing in order to support future releases on the SharePoint 2013 app model and Office 365 environments
      • Drop down selection of common notification scenarios
      • Migration notification list definition
        • Must be added to the root site collection
      • Configurable notification text with wiki-like syntax for inserting hyperlinks or a date from the Migration Notification List
        • More Info URL
        • New URL
        • Migration Date
      • SharePoint client object model property bag caching to reduce server load and increase performance
      • Supports the standard notification color selections
      • Include all sub-sites (notification can be overridden at the child site level)
      • New / test site URL replacement including the full path to the current page/form
      • Notification disable flag
      • Automatic population of the title field from the New Site URL wiki when sent to a ".../NewForm.aspx?source=..."  page (Using "New URL Set Title" syntax)
      • Permission based notification visibility (security trimming)
      • Notification dismissal option (cookie based)
        • 1 day dismissal duration
      • Automatically delete sites from the migration notification list by selecting Auto Delete or Auto Recycle in the Old Site Status field
        • This capability is enabled through a separate Site Collection feature and requires the user to have permissions to delete the site
        • This feature is especially useful for retention policies that require you to post a notice of deletion before deleting the site.
        • If you use Auto Delete instead of Auto Recycle, you should backup the site first if there is any possibility of needing a restore
    • Contact me for SharePoint Farm Upgrade or Migration services, to request a customized version of this solution, or to provide SharePoint Solution Architecture services
    Releases
    • Release 1.3.2.0 (2013 only): 11/7/2015
      • Fixed a bug when removing an existing Migration Notification List and adding another with a different name.
    • Release 1.3.1.0: 7/6/2015
      • SharePoint 2013 list view fix
      • 3 digit year date format fix (115 fixed to be 2015)
    • Release 1.3.0.0: 5/29/2015
      • SharePoint 2013 version created
    • Release 1.3.0.0: 5/27/2015
      • New Features
        • Auto Delete Old Site feature added
          • New feature activates migration notification list event receiver keying off a new field type "Old Site Status"
        • Refactored to use ScriptLink and _layouts JavaScript code file to enable browser based code caching
    • Release 1.2.1.0: 5/15/2015
      • Bug Fixes
        • Redirect URL now works when browsing folders within a list/library
          • These links now redirect to the Document Library root folder
      • New Features
        • Notification dismissal option (cookie based)
          • 1 day dismissal duration
    • Release 1.2.0.0: 5/13/2015
      • Bug Fixes
        • URLs with spaces and special characters now work correctly
          • You will need to make sure to unencode the URLs when entering them in the list.  The title field description now reflects this requirement.
        • Redirect URLs with special characters will now be encoded correctly
      • Added Features
        • Permission based notification visibility (security trimming)
    Backlog
    • Develop an Office 365 app version
    • Add parameter for dismissal duration length

    Tuesday, June 11, 2013

    BCS BDC external data lookup field migration

    Scenario
    • You want to programmatically set an External Data lookup field
      • Ex: Migrating data into a SharePoint list or library
    Issue
    • In this case, we used Idera / Metalogix Migration Manager, which does not support External Data fields, nor do they plan on supporting it in the near future
      • This is likely due to the fact that they offer a client only (non-server deployed solution) and haven't figured out how to do this using the remote content deployment APIs
    • The result was that the external data field only displayed correctly in the View Item form and did not populate in the Edit item form or any of the related/projected fields in the view.
    Resolution
    • Luckily I did have access to deploy a server solution, so I developed the following web part to handle the migration
      • If you are using Office 365 or don't have this access then you will need to develop your own solution or need to use a data synchronization solution instead (several vendors make these)
    • In order for this solution to work, you need to add a temporary column to the list that will store the IDs of the field you wish to migrate.  Note that this is not necessarily the display name.
      • In our case we migrated the ID column to a list column named SourceId, ran the tool, then deleted the SourceId column.
    • I utilized code from StackExchange and Jaspers' Weblog along with some forum posts, converting all to VB.Net for aesthetics
    • Download the code
      • The wsp solution file is located in the \SetExternalDataWebPart\bin\Release folder
      • You must enable the feature at the site collection level and add the web part to a page in the subsite that contains the list. 
      • In my test environment this tool updated 25 records every 10 seconds.
    • Notes
      • I found that in addition to setting the display name you also need to set the RelatedField to the BDCIdentity to get the correct value to display in the edit form and to be updateable via the refresh icon.
    // Set the BCS field itself (Display Value)
    listItem[dataField.Id] = dtBDCData.Rows[0][dataField.BdcFieldName].ToString();
    // Set the related field to the BDC Identity
    listItem[dataField.RelatedField] = dtBDCData.Rows[0]["BdcIdentity"].ToString();
    • Some other tips:
      • I had to use the RevertToSelf (BDC Identity) connection to get the refresh to function
      • I did not need to run with elevated or allowunsafeupdates except when debugging permissions.
    • Updated release info:
      • 6/27/2013
        • Added list ID range support to split copies into smaller chunks
          • Uses an SPQuery on ID field.
        • Added refresh interval for regular mid-copy status updates
          • These are actually just auto post backs using an asp.net timer control
      • 7/5/2013
        • Fixed refresh bug

    Friday, November 20, 2009

    SharePoint Backup and Migration Solutions - Third Party Tools

    SharePoint Backup, Restore, and Migration are some of the biggest pains with maintaining SharePoint.
    Here is a list of tools that have been developed to address some of the issues.  I will fill in details when and if I evaluate them.

    Disaster Recovery (these may also support backup/restore migrations)
    Migration
    Or if you feel lucky, the out of the box stsadm Export and Backup commands can be used.
    They should be supplemented with the following