Posts

Showing posts with the label site collection

SharePoint Framework / NodeJS ( setup envoriment)

Image
Hello SharePointiens,

i will show you how we configure our workspace to work with Sharepoint Framework:
Tools :
NodeJS server.
Visual Studio Code.
Cmder.

Open cmder :
d:/
mkdir workspace
cd workspace
mkdir SPFramework
cd SPFramework
mkdir HelloWorld
cd HelloWorld



now we should install yoman :
# install yo & gulp

npm install yo gulp # install Sharepoint generator npm install --global @microsoft/sharepoint-generator # create a new project yo @microsoft/sharepoint

SharePoint XSN provisionning with WSP

Image
it's not very simple to package a form xsn in the wsp solution, specialy if you want to do a provisionning.


You probably tried to use something like: 1<elements xmlns="http://schemas.microsoft.com/sharepoint/">
2<module name="DefaultForms" rootwebonly="FALSE" url="Lists/Forms">
3<file path="DefaultForms\TestForm.xsn" type="GhostableInLibrary" url="TestForm.xsn"/>
4</module>
5</elements>
But if you just put the XSN files in a module and deploy it to a Form-library like this, or just upload the xsn file to the library, the Info Path form will not be able to render (error: form is not browser enabled).
What you have to do to fix this is adding some extra properties:  1<elements xmlns="http://schemas.microsoft.com/sharepoint/">
 2<module 
 3name="DefaultFormulieren"
 4       rootwebonly="FALSE"
 5       url="Lists/Forms">

Activate / Deactivate Feature with PowerShell on all site collections of the webapp

Image
Hello,


When we do some change on the solution  specially on the branding  for exmple ( display teamplate),we should update also existing sites collection and replace old files with new one after the deployment. So this powershell Script with do this on the all farm. $feature = Get-SPFeature -Identity "ID OF THE FEATURE" $siteCollections = Get-SPSite –WebApplication $webhubUrl -Limit ALL $siteCollections | foreach-object {    Write-Host "Deactivating" $feature.DisplayName "on" $_.Url -foregroundcolor yellow    Disable-SPFeature $feature -Url $_.Url -confirm:$false
} $siteCollections | foreach-object {    Write-Host "Activating" $feature.DisplayName "on" $_.Url -foregroundcolor green    Enable-SPFeature $feature -Url $_.Url
}

Set custom level permission SharePoint PowerShell

Image
Hello,


Some time we need to apply a script on all the web application, today we can set the permission level for a specific group.

for the base permission you can use:
ViewListItems
AddListItems
EditListItems
DeleteListItems
ApproveItems
OpenItems
ViewVersions
DeleteVersions
CancelCheckout
ManagePersonalViews
ManageLists
ViewFormPages
Open
ViewPages
AddAndCustomizePages
ApplyThemeAndBorder
ApplyStyleSheets
ViewUsageData
ManageSubwebs
CreateGroups
ManagePermissions
BrowseDirectories
BrowseUserInfo
AddDelPrivateWebParts
UpdatePersonalWebParts
ManageWeb
UseClientIntegration
UseRemoteAPIs
ManageAlerts
CreateAlerts
EditMyUserInfo
EnumeratePermissions
CreateSSCSite

below the script :


$sites = get-spsite -Limit ALL –webapplication [webapp url]
ForEach ($spSite in $Sites)       
{        

$spWeb = $spSite.RootWeb

# Enter the Name of the Permission Level to Change
if ($PermissionLevel=$spWeb.RoleDefinitions["custom deinifition"])
{
Write-Host "working with : " $spSite -ForegroundColor Green
$bps = $PermissionLevel.…