Posts

Showing posts from 2017

js content

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { return typeof obj; } : function(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function() { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function(Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCall…

details

Summary by Project Types
https://social.msdn.microsoft.com/Forums/office/en-US/d9c22309-c4f7-469d-a2cc-d783391a7ee2/programmatically-creating-folder-in-custom-list?forum=sharepointdevelopmentprevious https://social.msdn.microsoft.com/Forums/office/en-US/fcd1a132-5c7f-47ca-aebf-666c70b84685/programmatically-change-spview-folders-setting-to-show-all-items-without-folders?forum=sharepointdevelopmentlegacy Found above: Thanks Serge! also had to do this: var view = paList.Views.Add(viewName, viewFields, string.Empty, 100, true, true); view.Scope = SPViewScope.Recursive; view.Update(); web.Update(); because: paList.Views.Add(viewName, viewFields, string.Empty, 100, true, true); paList.Views[viewName].Scope = SPViewScope.Recursive; paList.Views[viewName].Update(); web.Update(); didn't work :-( No wander: paList.Views[viewName] gets a new instance each time it is invoked. So the code above is equivalent to: paList…

spviewscope

$site=Get-SPSite $siteURL $web=$site.RootWeb $list=$web.Lists.TryGetList($listName) if($list -ne $null) { write-host -f green $listName "exists in the site" } else { write-host -f yellow $listName "does not exist in the site"

json

http://sharein.corp.ponet/innop/Cost-effectiveFuelSystemArchitectureForChinaVI/SitePages/Categories.aspx Add-PSSnapin Microsoft.Sharepoint.Powershell $site = Get-SPSite "SiteURL" $sitelists = foreach ($web in $site.AllWebs) { foreach($list in $web.lists){ $list }} $sitelists |select Title | Export-CSV C:\liststitles.csv Remove-PsSnapin Microsoft.SharePoint.PowerShell # declare an array to store results $results = @() # fetch databases (only configuration and content DBs are needed) $databasesToQuery = Get-SPDatabase | Where-Object {$_.Type -eq 'Configuration Database' -or $_.Type -eq 'Content Database'} | Sort-Object –Property Name # for each database get spshelladmins and add db name and username to result $databasesToQuery | ForEach-Object {$dbName = $_.Name; Get-SPShellAdmin -database $_.id | Sort-Object $_.username | ForEach-Object {$results += @{$dbName=$($_.username)}}} # …