var list = web.Lists[Constants.Lists.TaskList]; var view = list.Views["All Tasks"]; view.ViewData = ""; view.Update();
That's hours and hours of my life I'll never get back.
var list = web.Lists[Constants.Lists.TaskList]; var view = list.Views["All Tasks"]; view.ViewData = ""; view.Update();
$site = Get-SPSite $portalUrl $taxSession = Get-SPTaxonomySession -Site $site $termStore = $taxSession.TermStores[$managedMetadataService] $termStoreGroup = $termStore.Groups[$termStoreGroup] $termSet = $termStoreGroup.TermSets[$termSet] $term = $termSet.Terms.Item($term) $term.SetLocalCustomProperty("_Sys_Nav_TargetUrl", $newUrl) $termStore.CommitAll()
Tools > Options > Projects and Solutions > General > Track Active item in Solution Explorer
<Or> <Membership Type="CurrentUserGroups"> <FieldRef Name="AssignedTo"/> </Membership> <Eq> <FieldRef Name="AssignedTo"/> <Value Type="Integer"> <UserID/> </Value> </Eq> </Or>
var listViewWebPart = new ListViewWebPart { ListId = list.ID, ChromeType = PartChromeType.None, ViewGuid = list.Views[Constants.ViewNames.DocumentLibraryAllDocumentSets].ID.ToString("B").ToUpper() }; webPartManager.AddWebPart(listViewWebPart, "Top", 1);
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } Function UpdateManagedPropertyMapping([string]$managedPropertyName, [string]$crawledPropertyName, $searchApp) { $managedProperty = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchApp -Identity $managedPropertyName -ErrorAction SilentlyContinue Write-Host Adding/Updating managed property $managedPropertyName if($managedProperty -eq $null) { #create a new property Write-Host Creating managed property $managedPropertyName $managedProperty = New-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchApp -Name $managedPropertyName -Type 1 -Queryable $true -Retrievable $true $managedProperty.Refinable = $true $managedProperty.Sortable = $true $managedProperty.Update() Write-Host Created managed property $managedPropertyName } else { Write-Host Managed property $managedPropertyName already exists } $managedPropertyMapping = Get-SPEnterpriseSearchMetadataMapping -SearchApplication $searchApp -ManagedProperty $managedProperty if($managedPropertyMapping) { #remove mapping Write-Host Removing existing mapping Remove-SPEnterpriseSearchMetadataMapping -Identity $managedPropertyMapping -Confirm:$false } Write-Host Mapping property $crawledPropertyName to $managedPropertyName $crawledProperty = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchApp -Name $crawledPropertyName $managedPropertyMapping = New-SPEnterpriseSearchMetadataMapping -SearchApplication $searchApp -ManagedProperty $managedProperty -CrawledProperty $crawledProperty Write-Host Finished adding/updating managed property $managedPropertyName } $searchApp = Get-SPEnterpriseSearchServiceApplication UpdateManagedPropertyMapping FFBoKAuthor ows_Author0 $searchApp UpdateManagedPropertyMapping FFBoKPublicationYear ows_CategoryLevel1 $searchApp UpdateManagedPropertyMapping FFBoKCategory1 ows_CategoryLevel1 $searchApp