Download all files from library

pnp logo

Hello everyone,

Today I’ll share a little PowerShell script I made some time ago. It allows you to download all files of a single library, looping through all subfolders. This script use PNP PowerShell .

It was done for Office365 but should work the same way for onpremise. You just need to update the parameter on the top and run it. It will prompt you for your credentials to access the site and then download all the files to the specified directory (creating it if it doesn’t exist)

Hoping this helps!

Christopher

 

Use default rendering in JSLink

SP2013

Hello everyone,

Today I will talk about the JsLink we use to make custom displays in our good old classic 2013 interface.

A typical example is the following

In this example, we change the rendering of the “AssignedTo” field with a custom html of our own.

This example can sometimes be too much for simple requests such as “I want to display this field in Read-Only”.

To do this, you can use the default SharePoint rendering!

I want to thank the person who took time to compile this really useful information!

For my part, my source is the following: https://sharepoint.stackexchange.com/questions/112506/sharepoint-2013-js-link-return-default-field-rendering

Hoping this helps !

Christopher.

Uploading files to some library take (lot of) times

SP2013

 

Hello everyone,

Today we will talk to you about a problem that can arise when uploading documents in a library => slowness!

When I say “we”, it is my colleague Yannick Plenevaux and myself. Having faced this problem together, we figured we would write together about it!

Go to the post!

Christopher.

GDPR Activity Hub

 

GDPR

Hello everyone,

Yesterday I talked to you about the GDPR and where to find interesting information for setting up your platform.

With some research, I found a GIT Hub repository set up by PNP people. This repository offers you a starter kit for your project of setting up the GDPR.

https://github.com/SharePoint/sp-dev-gdpr-activity-hub

 

Warning! As mentioned on the homepage, MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE INFORMATION IN THIS GDPR Activity Hub.

Hoping this helps,

 

Christopher

GDPR – Get Started

GDPR

Hello everyone,

Today I will talk about the GDPR and what it means for SharePoint, among others.

What is GDPR?

The General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679) is a regulation by which the European Parliament, the Council of the European Union and the European Commission intend to strengthen and unify data protection for all individuals within the European Union (EU). It also addresses the export of personal data outside the EU. The primary objectives of the GDPR are to give control back to citizens and residents over their personal data and to simplify the regulatory environment for international business by unifying the regulation within the EU. When the GDPR takes effect, it will replace the data protection directive (officially Directive 95/46/EC) from 1995. The regulation was adopted on 27 April 2016. It becomes enforceable from 25 May 2018 after a two-year transition period and, unlike a directive, it does not require any enabling legislation to be passed by national governments and is thus directly binding and applicable.

Source : Wikipedia

 

In summary, if you have a database containing information about a European person, you need to have a series of processes in place to explain why you have this data, what processes use that data, what is the duration of retention of this data, etc, etc ..

Microsoft helped to set up this regulation, they also made available a site explaining the different points. I urge you to learn more about this subject and especially, do not wait until the last minute!

https://www.microsoft.com/en-us/trustcenter/privacy/gdpr/get-started

 

Hoping this helps,

 

Christopher

List of free tools for SharePoint

Hello everyone,

Today I’ll do some advertising for another blogger who makes a great post about free tools for SharePoint.

Some of them are new to me and seems pretty awesome! Great job Velin and Thank you for this one!

http://blog.velingeorgiev.pro/sharepoint-online-free-developer-tools-list-more-productivity

 

Hoping this helps,

Christopher.

Quick Win – Display attachments in list

win

Hello everyone,

Today, in the Quick Win series, I’ll talk about the possibility to view attachments in a list view.

By default, when you have one or more attachments to a list item, you see this

attachment1

If you open the properties of the item, you see the full list of attachments

attachment2

To display the full list of attachments in the view of your list, simply add the following JSLink (don’t forget to fix the path for the JQuery file)

(function () { 

// jQuery library is required
(window.jQuery || document.write('<script src="PATH/jquery.min.js"><\/script>'));
// Create object that have the context information about the field that we want to change it output render  

var linkFiledContext = {};
linkFiledContext.Templates = {};
linkFiledContext.Templates.Fields = {
"Attachments": { "View": AttachmentsFiledTemplate }
}; 

SPClientTemplates.TemplateManager.RegisterTemplateOverrides(linkFiledContext); 

})(); 

// This function provides the rendering logic for list view
function AttachmentsFiledTemplate(ctx) {
var itemId = ctx.CurrentItem.ID;
var listName = ctx.ListTitle;
return getAttachments(listName, itemId);
} 

function getAttachments(listName,itemId) {
var url = _spPageContextInfo.webAbsoluteUrl;
var requestUri = url + "/_api/web/lists/getbytitle('" + listName + "')/items(" + itemId + ")/AttachmentFiles";
var str = "";
// execute AJAX request
$.ajax({
url: requestUri,
type: "GET",
headers: { "ACCEPT": "application/json;odata=verbose" },
async: false,
success: function (data) {
for (var i = 0; i < data.d.results.length; i++) {
str += "<a href='" + data.d.results[i].ServerRelativeUrl + "'>" + data.d.results[i].FileName + "</a>";
if (i != data.d.results.length - 1) {
str += "
";
}
}
},
error: function (err) {
console.log(err)
}
});
return str;
}

Et voila!

attachment3

I wish I had the idea but I did not write this code, I found it on this msdn topic (Thanks Denis Guo)

Hoping this helps!

Christopher