finestre di disattivare globalmente di dialogo per tutte le liste?
-
16-10-2019 - |
Domanda
In SharePoint 2010, gli elenchi sono impostati per aprire le finestre di dialogo modale per gli inserti delle voci e gli aggiornamenti. So che queste finestre di dialogo possono essere disabilitate in un elenco da basi lista andando su Impostazioni Lista -> Avanzate e de-selezionando le "forme di lancio in una finestra di dialogo" l'opzione. C'è un modo per le finestre di dialogo modali disattivare globalmente per tutte le liste, attuali e futuri?
Soluzione
You can change it with powershell. This might help you:
Get-SPScripts: Change SharePoint list settings using PowerShell - Part 2: Advanced Settings
The article shows how to change a list's Advanced Settings programmatically, and the table row at the bottom of the article entitled 'Dialogs' gives the property you're interested in. Putting the two together would give you:
#Change these variables to your site URL and list name
$site = Get-SPSite http://portal
$listName = "Shared Documents"
#Walk through each site in the site collection
$site | Get-SPWeb | ForEach-Object {
#Get the list in this site
$list = $_.Lists[$listName]
#Launch forms in dialog?
#Setting this to $true will set it to 'No' in the UI
$list.NavigateForFormsPages = $true
#Update the list
$list.Update()
}
#Dispose of the site object
$site.Dispose()