Wednesday, July 20, 2016

SharePoint Online MobileExcelWebAccess Feature - Unable to create site using custom template

I am sure you would have got this error suddenly while creating sites using custom template in SharePoint Online.
Error: MobileExcelWebAccess Feature e995e28b-9ba8-4668-9933-cf5c146d7a9f Not activated



Microsoft is unsure about the issue but there is a fix. 

Prerequisites:
- You should be an Administrator 
- Windows PowerShell
- SharePoint Online Management Shell
- SharePoint Online Client Components SDK (Download: http://www.microsoft.com/en-us/download/details.aspx?id=42038)

Steps
1. Open Windows PowerShell in Administrator mode and execute the script
         Set-ExecutionPolicy -ExecutionPolicy Unrestricted

2. Open SharePoint Online Management Shell in Administrator mode and execute the script

$clientDll = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
$runtimeDll = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")


$url = "https://<your site collection url>"


$cred = get-credential

$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($url) 
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($cred.username, $cred.password) 
$clientContext.Credentials = $credentials 

if (!$clientContext.ServerObjectIsNull.Value) 

    Write-Host "Connected to SharePoint site: '$Url'" -ForegroundColor Green 
}

$clientContext.Site.Features.Add('e995e28b-9ba8-4668-9933-cf5c146d7a9f',$true,[Microsoft.SharePoint.Client.FeatureDefinitionScope]::None)

$clientContext.ExecuteQuery()

Note: Do not forget to replace the $url with your site collection url

Alternatively, you shall save the above #2 script in .ps1 file and execute it.
To execute the .ps1 in SharePoint Online Management shell;
- Open SharePoint Online Management Shell in Administrator mode
- Go to the directory where you have .ps1 file
- Type .\<file name>
- A prompt will be displayed that asks your credential (Administrator)

That's it !!!!!

Thursday, July 14, 2016

SharePoint 2013 / SharePoint Online Create multiple Pages library

My requirement was to have separate Pages library for categories. 
So, I took the Pages library template and tried to create a library using the template. SharePoint throws an error. 

I contacted Microsoft Support team and they confirmed that a site cannot have more than one Pages library. 

Today I accidentally found a way to accomplish that. This post lead me to this. 

We can select the Page template while creating Document library. 

SharePoint 2013 / SharePoint Online Create OneNote document library

SharePoint provides very easy way to accomplish many business requirements. But we, developers, always think advanced solution that takes lots of effort.
One of the example is Document library for OneNote.

I started thinking to have content type with template and etc.,

And found out the easy way.

1. Click Add an app

2. Choose Document Library 
3. Click Advanced Options

4. Select Document Template as "Microsoft OneNote 2010 Notebook"
5. Click Create.

That's it !!!!!



Friday, July 8, 2016

AngularJS Filter Exact match / Filter Strict search

I wanted to get results with exact match using filter property in AngularJS.

Let us assume I have JSON values;

$scope.languages = [
        {id:19, name:"German", available: false},    
        {id:119, name:"English", available: true},    
        {id:3, name:"French", available: false},  
        {id:4, name:"Italian", available: true},  
        {id:5, name:"Spanish", available: false}
    ];

I wanted to display only German using id. Then my AngularJS filter would be;

<li ng-repeat="language in languages | filter: {id: 19}">{{language.name}}</li>

Unfortunately, I got two results; German and English
I was confused and found the reason that it is searching the IDs with "contains" keyword.
German's ID is 19
English's ID is 119

Therefore the filter value 19 is present in both German and English.

How do I get results with exact match?
Answer: Mention :true in filter

<li ng-repeat="language in languages | filter: {id: 19}:true">{{language.name}}</li>


Here is the working example in jsfiddle;

Issue: http://jsfiddle.net/to7z06ma/65/

Fix: http://jsfiddle.net/to7z06ma/66/


SharePoint Library settings is missing in new look and feel

I was introduced to new look and feel in SharePoint Online (SharePoint 2013 version) for document library on a Team site. At first I was like "Wow !" then it turned me down.

I wanted to go to Library Settings. I thought it should be under the Ellipsis (3 dots) button. When I clicked on it, I was shocked. Because;
Just "Alert me" !!!!!!!! Don't Panic !

After spending lot of time, then I found it !
Yes, they moved it to the Gear icon on topmost ribbon. This is meaningless (for now)!



Also I noticed, the gear icon menu is dynamic, based on the page we are in. 
Hope it is useful to someone.

Tags: SharePoint Online, SharePoint 2013, library settings menu is missing,