|
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)
-eq $null)
{
Add-PsSnapin Microsoft.SharePoint.PowerShell
}
function Fix-UnableToOpenLookupList( [Parameter(Mandatory=$true)][string] $siteCollectionURL, [Parameter(Mandatory=$true)][string] $internalFieldName)
{
$site = get-spsite $siteCollectionURL
$web = $site.RootWeb
$field = $web.Fields.GetFieldByInternalName($internalFieldName)
if($field -eq $null)
{
Write-Host -ForegroundColor
Red "ERROR:
Missing $($internalFieldName) column."
}
else
{
$txHiddenList =
$web.Lists["TaxonomyHiddenList"]
if($txHiddenList
-eq $null)
{
Write-Host -ForegroundColor
Red "ERROR:
Missing TaxonomyHiddenList."
}
else
{
$strXmlSchema =
"
|
WebId="3c8e614a-be52-4210-93ac-8b40d3a85227"
ShowField="Term$Resources:core,Language;"
StaticName="EstimationType"
Group="$Resources:EPContentManagement,EPGroupName"
ID="{b04c8f3f-cbbf-4fdc-b646-639377c1395a}"
SourceID="{5ec29463-9b4b-403d-b6c1-958d526382b7}"
Name="EstimationType" Mult="FALSE" Version="6" Required="FALSE" EnforceUniqueValues="FALSE" ShowInEditForm="FALSE" ColName="int3" RowOrdinal="0">
" p4:type="q1:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">7f76724b-947d-4aaf-a042-fcbe5a247852>

