SharePoint Saturday Ottawa – December 2016

On December 3, 2016, I was at Ottawa presenting at SharePoint Saturday Ottawa 2016.

The event was at Algonquin college.

I presented on developer introduction to new SharePoint framework (SPFx). I would like to thank everyone who attended my session.
It was awesome to see lot of interest to learn new framework as there were users who did not have any background on SharePoint server side model but wanted to learn more about how they can use their existing web development skills to build against SharePoint Online.
Kudos to all the organisors, sponsors and volunteers for successful event!!!

Collaborating with External Users Using the Sharing Feature of Office 365 (SharePoint Online) – Part1

In this article I am going to talk about how Office 365 external sharing can be used to increase productivity by collaborating with your external partners and vendors.

We are currently living in a world where collaborating and communicating with external vendors and partners has become essential in order to effectively run your business. With that in mind, sharing content with users outside of the organization is becoming commonplace. Office 365 can help organizations do this by facilitating this collaboration with external users safely and securely.

In this post I am going to focus on SharePoint Online External Sharing. I’ll be covering the following topics when it comes to External Sharing in SharePoint Online.

  • Different ways to share content with External users.
  • External Sharing Approvals

Please note – this post assumes that you currently have external sharing enabled on your Office 365 tenant.

Different ways to share content with External users

When using SharePoint online you can share content with External users in three different ways.

  1. Sharing a specific site with an external user:

You can invite External users to share a specific SharePoint site. When you share a specific SharePoint site with an external user it will send an invite via email to the user with a link to the site that you would like to share. Once the external user clicks on the link in the invitation, they are prompted to sign-in using their own Microsoft account.

By default, users are not required to sign-in using the account that was used for the invitation. E.g. If you invited an external user using example@outlook.com as the email and the user signed-in using anotherexample@outlook.com; the user would still be able to access the site. However, Microsoft recently added a setting at the tenant level which prevents this and forces users to login using the same account that was used for the invitation.

Also, depending on role of the user inviting the external users, there will be an additional step for requesting approval before the email gets sent to an external user. This information is covered in the “External Sharing Approvals” section.

  1. Sharing a specific document with an external user:

In certain scenarios you would only want to share a specific document with an external user. You can achieve this by selecting the document and clicking the “share” option from within the dropdown menu. Sending an invitation to share a document is a similar process to above in regard to sharing a site in that an external user would also be required to sign-in before accessing the shared document. The only difference is that the user would only get access to the document you shared.

  1. Using the guest link:

If you would prefer to give an external user access to a document without being required to sign-in, you can use the guest link option. To generate the guest link, select the document and then click guest link option from the drop-down list.

 

I hope this gives you some overview of sharing feature. In the next part I will cover the external user approval process.

Using Javascript Object Model (JSOM) with Nintex Forms

Recently working on a project I came across an interesting scenario where I had to use Nintex form. As a part of the process the form will be querying multiple lists and displaying data on the form.

You can achieve this using the Nintex Form out of the box controls but there were specific requirements which could be achieved using the out of the box controls.

I decided to use the JSOM to complete the task and plugged in my JSOM code into Form’s custom JavaScript section. To my surprise when I ran the Nintex form nothing happened.

Quickly I figured that my code was getting executed before SharePoint finish loading all the files and required SP.js file was missing at the time of code execution.

So I tried Script on Demand to make sure that my function only gets executed after the SP.js is available.

Here is the code I have added to my Nintex form.

NWF.FormFiller.Events.RegisterAfterReady(function () {

               SP.SOD.executeFunc('sp.js', 'SP.ClientContext', myFunction);

}




function myFunction() {

.

.

.

.

}

Once I added that one line my code worked like a charm. So if you are working with Nintex forms and would like to use JavaScript Object Model then you might run into the same issue and in that case just make sure to use Script On-Demand.

SharePoint Discussion Board Quick Edit is disabled

One of the thing that you will notice that working with SharePoint Discussion Board you do not have ability to edit items using the Quick Edit. Based on my research Quick Edit option is only available when you have Standard View on your list. Since Discussion Board does not have Standard View Quick Edit option is disabled.

Doing research on this I came across this MSDN forums where the workaround was mentioned as using a PowerShell to enable Quick Edit on your Discussion Board list.

https://social.technet.microsoft.com/Forums/sharepoint/en-US/b5a74681-ba88-43e2-b406-82d25fa38b25/quick-edit-greyed-out-in-custom-list

$web = Get-SPWeb “YOUR WEB URL”
$list = $web.Lists.TryGetList(“YOUR DISCUSSION LIST”)
$list.DisableGridEditing = $false
$list.Update()

I have tried this on my development environment and it seems to be working but just word of caution, I am not sure if this method of enabling Quick Edit is supported.

So if you are using this approach I would advise you to validate if this is supported by Microsoft.

Get Site Collection properties using PowerShell – SharePoint 2013

Today I am just going to blog about how to get certain information about site collections to which SharePoint Administrators might not have access to. This question comes up quite often on SharePoint forums.

If you are looking to get information for the site collection or want to generate report on site collection properties then your best friend is Get-SPSiteAdministration cmdlet. This cmdlet contains more than one parameter set. You may only use parameters from one parameter set, and you may not combine parameters from different parameter sets.

If you want to learn how to use parameters sets then follow the link below.

https://msdn.microsoft.com/library/dd878348(VS.85).aspx

For example if you would like to list primary site collection administrator and secondary site collection administrator then you would use something like,

Get-SPSiteAdministration -identity SITECOLLECTIONURL -Limit ALL | Select -Property OwnerDisplayName, SecondaryContactDisplayName

Here is the list of all the properties that you can get using this cmdlet.

https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsiteadministration_properties.aspx

Similar to this there is Set-SPSiteAdministration cmdlet which can be used to set different properties for the site collections.

Cannot find s4-ribbonrow in oslo master page

Today’s post is quick how to when working with SharePoint Online Master page.

When working with SharePoint Online oslo master page, you will find that usual way of hiding gear icon would not work i.e. you will not find the div for s4-ribbonrow. Seattle.master still has that.

Reason for that is because Oslo and Seattle are different master page. You can read about the difference in the following blog post.

Coming back to hiding the gear icon you can target the button ID to hide it.

Either in your CSS or Script Editor web part add the following Style.

<style>#O365_MainLink_Settings{ display:none;}</style>

Where O365_MainLink_Settings is the ID of Settings button.

I hope this helps someone.