Changing SharePoint Metadata on Records Managed by Collabware

Metadata on our SharePoint documents can and often are part of the record itself. The modified by, modified date, created by and created date are of course important but are not modifiable by end users outside of simply using SharePoint unless you can write code and have access to the sever.

Solution specific metadata like Vendor, Approved By or email metadata like To, From and Subject though may be a critically important aspect of the record and aid in discovery. Therefore, when Collabware declares an item as a record in SharePoint and marks the content immutable, the metadata along with that document will necessarily also be protected.

However, we don’t live in a perfect world and sometimes you may have a valid reason for changing the metadata on a document after it has become a record. For example, if you want to set the project end date on a series of documents to drive retention or change the name of a department on documents after a company reorganization to ensure findability or properly assign the individuals for content review during disposition. 

Collabware does offer the ability to undeclare records, but doing so will leave our content susceptible to deletion, pollute out audit trail unnecessarily and add effort to the ongoing maintenance of the solution.

One of the key and correct decisions that Collabware made was to leverage the record locking functionality offered by SharePoint instead of creating their own locking mechanism. So it’s possible for us to leverage SharePoint’s Record Management API for certain tasks when dealing with records.

Here’s an example PowerShell script that leverages SharePoint's Records Management API to modify a Comments field by passing a delegate to the byPassLocks method (note this will need to be run under an all-powerfull Farm Administrator account:

[void] System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.RecordsManagement.RecordsRepository.Records")
if(-not(Get-PSSnapin | Where { $_.Name -eq "Microsoft.SharePoint.PowerShell"})) {    Add-PSSnapin Microsoft.SharePoint.PowerShell;}
$recordsmanagement=[Microsoft.Office.RecordsManagement.RecordsRepository.Records]
#Delegate method to change the metadata on a document$ChangeRecord = {     param( [Microsoft.SharePoint.SPListItem] $item )      $item["Comments"] = "Comments changed on record by ByPassLocks Delegate"     $item.Update()   }
#get the web$web = Get-SPWeb “http://portal.collabware.com/sites/Demo”
#get the library$list = $web.lists["Commented Documents"]
foreach($item in $list.Items) {    #pass the delegate to the By Pass locks API    $recordsmanagement::bypasslocks($item, $ChangeRecord)}
Michael Schweitzer

Michael is the CEO and founder of Gravity Union. Michael has deep Office 365, SharePoint ECM, and Collabware experience. He has assisted numerous customers in not only getting the most out of Office 365, SharePoint, and Collabware CLM but has also helped them to reach their organizational information management goals with astounding results. He was awarded the first Collabware MVP designation and is the creator of the “Seven Pillars of ECM” philosophy. Michael has a Degree in Computer Systems Technology and is a sessional instructor at the British Columbia Institute of Technology.

Previous
Previous

Effectively Adding Motivation to Your Change Management Strategy

Next
Next

In-Place Records Management vs Record Centers. Why leveraging both is critical to the long-term success of your SharePoint ECM solution