Collaboration-2-Go


Lösungen und Software-Entwicklung im Collaboration Umfeld, insbesondere Microsoft SharePoint, Microsoft Exchange und Microsoft Office.

Support


Mobil: +49 (152) 53 97 78 79
Mail: service@collaboration-2-go.de
Weitere Kontaktmöglichkeiten: Kontaktseite
Dekoration: Köln



Nintex - Resolve SharePoint and Active Directory Groups
Created: 22.11.2020
Categories: SharePoint 2016; SharePoint 2019; Nintex

In order to retrieve all members in aSharePoint group (including AD groups) you must follow these steps:
- get members of the SharePoint group using a SharePoint web service; result in an XML
- collect information about these group members
Resolve SharePoint and Active Directory Groups

Web Service call using UserGroup.asmx:
Resolve SharePoint and Active Directory Groups

3 tasks which evaluate the XML result using these XPath values:
/defaultNS:GetUserCollectionFromGroup/defaultNS:Users/defaultNS:User/@Name
/defaultNS:GetUserCollectionFromGroup/defaultNS:Users/defaultNS:User/@LoginName
/defaultNS:GetUserCollectionFromGroup/defaultNS:Users/defaultNS:User/@IsDomainGroup

Resolve SharePoint and Active Directory Groups

Resolve SharePoint and Active Directory Groups

Test result (for each item):
- get login name
- get information wether item is a active directory domain group (IsDomainGroup):

Resolve SharePoint and Active Directory Groups

Resolve SharePoint and Active Directory Groups

Resolve SharePoint and Active Directory Groups

Resolve SharePoint and Active Directory Groups

Switch: if item is a group start a LDAP query.

Resolve SharePoint and Active Directory Groups

Preparation (get login name only):

Resolve SharePoint and Active Directory Groups

LDAP query:

Resolve SharePoint and Active Directory Groups

LDAP query Value:
(&(objectClass=group)(samaccountname={WorkflowVariable:var_login}))

Recursive LDAP query Value:
(&(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=CN={WorkflowVariable:wfDistinguishedName}))
(you have to get the distinguished name first)

Resolve SharePoint and Active Directory Groups

Resolve SharePoint and Active Directory Groups

Value:
(&(objectClass=user)(distinguishedName={WorkflowVariable:var_groupMember}))

Resolve SharePoint and Active Directory Groups

Resolve SharePoint and Active Directory Groups

Resolve SharePoint and Active Directory Groups
    

Send us a Comment!


Fun with JavaScript and SharePoint: View Item Permissions
Created: 01.03.2020
Categories: SharePoint 2016; SharePoint 2019; SharePoint Online/Office365; SharePoint Development; JavaScript

Without any doubts individual permissions for documents and list items are a bad idea. But sometimes it is necessary. In SharePoint those individual permissions are hard to manage. With this extension you can see the permissions in the standard view.


      
Document Library:

DocLibPermissions

Documents with inherited permissions:

Documents with inherited permissions

Documents with individual permissions:

Documents with individual permissions
      
  
Let me know if you are interested.
    

Send us a Comment!


Fun with JavaScript and SharePoint: QR Code
Created: 01.03.2020
Categories: SharePoint 2016; SharePoint 2019; SharePoint Online/Office365; SharePoint Development; JavaScript

Add a QR code to each SharePoint page using a JavaScript. If the user clicks on the button, a modal dialog pops up that shows the current url as a QR code.
  
  
Button:
  
QR code promoted action
  
  
Modal Dialog:
  
QR Code
  
Let me know if you are interested.
    

Send us a Comment!


Export und Import SPWeb with Workflows
Created: 13.11.2018
Categories: PowerShell; SharePoint Development; SharePoint 2016

      If you want to export and import a SharePoint site you can use Export-SPWeb and Import-SPWeb. In most cases these commands work fine.
  If you have SharePoint Designer Workflows in this site, SharePoint adds a folder called "Workflows" and sometime this folder has a property
  called "docid_msft_hier_listid_validate" and a value which is invalid during the import.
  
  German error message:
  Import-SPWeb : Von der Zeichenfolge dargestellte DateTime liegt außerhalb des gültigen Bereichs.
  
  The following command changes the value and an import can be executed without problems:

  
$web = Get-SPWeb -Identity https://sharepoint/sites/PowerShellTests
$folder = $web.Folders["Workflows"]
$property = $folder.Properties["docid_msft_hier_listid_validate"]

$dt = Get-Date -Year 2100 -Month 12 -Day 31
$folder.Properties["docid_msft_hier_listid_validate"] = $dt
$folder.Update()
$web.Update()
  

    

Send us a Comment!


Rename Internal Document Library Name
Created: 10.11.2018
Categories: PowerShell; SharePoint Development; SharePoint 2016

      If you want to rename a SharePoint library you can use the library configuration.
  If you want to rename the internal name you could use SharePoint Designer. Unless you have more than 5.000 items (which is a bad idea anyway):
  
  Server error: The attempted operation is prohibited because it exceeds the list view treshold enforced by the administrator.

  Ribbon
  
  But you can change the internal name using PowerShell:
  
      
    $url = "https://sharepoint/sites/PowerShellTests"
    $web = Get-SPWeb $url
    $lib = $web.GetList($web.Url + "/oldName")
    $rootFolder = $lib.RootFolder
    $rootFolder.MoveTo($web.Url + "/newName")
  

    

Send us a Comment!


Re-Apply Quotas
Created: 05.10.2017
Categories: PowerShell; SharePoint Development; SharePoint 2016

      If you change a quota template you have to re-apply the template. In this case it was very easy since all sites have the same quota (personal My Sites).

      
$wa = $get-spwebapplication "my site host url"
$wa.Sites | foreach-object {
  if ( $_.Url.StartsWith("my site host url/personal") ) {
    Set-SPSite -Identity $_.Url -QuotaTemplate "Personal Site"
  }
}

    

Send us a Comment!


Empty Popularity Trends and Most Popular Items
Created: 24.08.2017
Categories: SharePoint Development; PowerShell; SharePoint 2016

      In case the popularity trends report and the most popular items report are empty you can check (and re-eanble) the event receivers using PowerShell:

      Get receivers:
      
      $analytics = Get-SPUsageDefinition | where {
        $_.Name -like "Analytics*" }
      $pageRequests = Get-SPUsageDefinition | where {
        $_.Name -like "Page Requests" }
      


      Check receivers:
      
      $analytics.Receivers.Count
      $pageRequests.Receivers.Count
      


      If the result is 0 you can re-enable the receivers
      (remove line breaks)
      
      if ($analytics.Receivers.Count -eq 0)
      {
        $analytics.Receivers.Add(
          "Microsoft.Office.Server.Search.Applications,
          Version=16.0.0.0, Culture=neutral,
          PublicKeyToken=71e9bce111e9429c",
          "Microsoft.Office.Server.Search.Analytics.Internal.
          AnalyticsCustomRequestUsageReceiver")
      }
      if ($analytics.EnableReceivers -eq $false)
      {
        $analytics.EnableReceivers = $true
        $analytics.Update()
      }

      if ($pageRequests.Receivers.Count -eq 0)
      {
        $pageRequests.Receivers.Add(
          "Microsoft.Office.Server.Search.Applications,
          Version=16.0.0.0, Culture=neutral,
          PublicKeyToken=71e9bce111e9429c",
          "Microsoft.Office.Server.Search.Analytics.Internal.
          ViewRequestUsageReceiver")
      }
      if ($pageRequests.EnableReceivers -eq $false)
      {
        $pageRequests.EnableReceivers = $true
        $pageRequests.Update()
      }
      

    

Send us a Comment!


Indent SharePoint Task using Nintex
Created: 09.08.2017
Categories: SharePoint 2016; Nintex

      Indent SharePoint Task using Nintex

      Ribbon

      Nintex doesn't provide the appropriate field
      in order to indent a task below another task.

      Solution:
      - Create Nintex Workflow (in this sample: in the task list)
      - Remember current item ID in a variable
      - Create task within this Workflow
      - Remember new item ID in a variable
      - Wait a while
      - Call WebService in order to update new item
      - Voilá

      Ribbon

      Web Service Call:

      Ribbon
      
      Web Service XML:
      
      
      <Batch OnError="Continue" PreCalc="TRUE" ListVersion="0">
        <Method ID="1" Cmd="Update">
          <Field Name="ID">SubItemID</Field>
          <Field Name="ParentID">ItemID</Field>
        </Method>
      </Batch>
      

      
      Please replace SubItemID and ItemID by the corresponding
      workflow variables.
      
      Result:
      
      Ribbon
    

Send us a Comment!