Category Archives: sharepoint 2013

How to find restore option for classic SharePoint libraries in Office 365

Have you heard about the new “Restore this Library” feature for modern libraries?

It’s a really cool feature for libraries and it’s pretty straightforward to get there.

To get the Restore page in a library with modern experience

If you are in the library and click on the “gear” menu, you can easily find an extra link that says “Restore this library” – support article for the feature.

Restore

To get the Restore page in a library with the classic experience

But what if you want the same for a classic library of yours. Just add “?p=18” to the end of your library hyperlink.

In short, if your library link is:

https://your-site-link/sites/site-name/library/AllItems.aspx

Add the magic query string and convert that to:

https://your-site-link/sites/site-name/library/AllItems.aspx?p=18

Pretty easy right? ūüôā

Enjoy.

 

Tips for Microsoft Flow expressions

Expressions are an easy way of modifying and formulating the data that we would want to capture in Microsoft Flow.

Expressions that I used recently

Adding 90 Days as an expression –

formatDateTime(addDays(utcnow(), 90), ‘yyyy-MM-dd’)
To calculate first day of the current month –
formatDateTime(startOfMonth(utcNow()), ‘dd-MM-yyyy’)
Calculating 3 days before the first day of the current month –
formatDateTime(addDays(addToTime(startOfMonth(utcNow()), 1, ‘Month’), -3), ‘dd-MM-yyyy’)

Joining conditions like ‘And’, ‘Or’ in conditional statements –

In order to join conditions, use the “basic mode” to create all the conditions needed and copy them.
Then remove the “@” symbol from the beginning, join them with commas and add the @AND or @OR condition required.
For eg. – The below condition checks if the Title or the “Email Contact” field has the text “mailto” in it.

@OR(contains(items(‘Apply_to_each’)?[‘Title’], ‘mailto’),
contains(items(‘Apply_to_each’)?[‘Email_x0020_Contact’], ‘mailto’))

To get this first I created a condition for checking if the Title contains the “mailto” text, which gets transcribed as:
@contains(items(‘Apply_to_each’)?[‘Title’], ‘mailto’)
Similarly, for the Email Contact column, the code gets created as:
@contains(items(‘Apply_to_each’)?[‘Email_x0020_Contact’], ‘mailto’)
In order to create an OR statement between them I had to remove the “@” symbol from the beginning, join them with commas and add the @OR condition required and finally it becomes –
@OR(contains(items(‘Apply_to_each’)?[‘Title’], ‘mailto’),
contains(items(‘Apply_to_each’)?[‘Email_x0020_Contact’], ‘mailto’))

Get SharePoint list items more than the default 100 items

The Get SharePoint list items method will only retrieve the first 100 records by default.
To expand that to the desired amount of records, we will have to edit the settings of the “Get Items” property

Flow1

Flow2

 

That’s all for now ūüôā

Accordion menu for SharePoint modern pages

The goal of the article is to create something like this:

Accordion

and the accordion menu expands to more text details.

Accordion1

To accomplish this, I have used the React script editor webpart that I found on GitHub combining with some good old jquery.

  • Follow the instructions to git clone and install the script editor webpart from GitHub.
  • Make sure to change the default setting to the following in the¬†ScriptEditorWebPart.manifest.json file before deploying the app.
"requiresCustomScript": false
  • After the webpart is added to the site, add the app to the required page and insert the following text in the webpart:

<script src="Refer-Jquery-path/jquery-1.11.2.min.js"></script>
<script type="text/javascript">

$(document).ready(function(){

$(".ControlZone-control :header").css("line-height", "7%");
$(".ControlZone-control :header").css("border-top", "8px solid transparent");
$(".ControlZone-control :header").css("border-bottom", "8px solid transparent");
$(".ControlZone-control :header").css("border-left", "10px solid black");
$(".ControlZone-control :header").css("padding-left", "13px");
$(".ControlZone-control :header").css("margin-bottom", "30px");
$(".ControlZone-control :header").css("cursor", "pointer");
$(".CanvasSection-xl12 .ControlZone-control .cke_editable p").css("display", "none");
$(".CanvasSection-xl12 .ControlZone-control .cke_editable p").css("margin-bottom", "30px");

$(".ControlZone-control :header").click(function(){
$(this).nextUntil(".ControlZone-control :header").toggle();
});
});

</script>

You can also customize it further to have images or videos in each menu item.

However, you will have to add them as separate image webpart below the text webpart and tweak the jquery to combine the accordion effect on both the text and image webparts.

Convert a SharePoint designer document notification workflow to Microsoft Flow

During the migration phase of our projects from SharePoint on-premise to O365, we had to convert a couple of good old SPD workflows to Microsoft Flow.

Condition

Whenever a document in a library is due for review, i.e, 30 days before the “Next Review” date, fire a notification to the document “Owner” based on a defined template.

SPD Workflow way

When a document is created or modified, check whether the current date matches the “Next Review” date minus 30. If it doesn’t, pause the workflow until that date is reached and fire an email notification.

Microsoft Flow way

Flow

Create a Recurrence action that checks every day for each item in the library whether the condition, “Next Review” date minus 30, has reached.

It will fire emails for any document that has the condition satisfied.

The action items used here – “Recurrence” for repetition, “Get Items” for getting all items in a SharePoint library, “Apply to each” for checking the condition on each list item, “Send an email” to alert the users.

I simply love Flow, just because:

  • it’s too easy to change the email template.
  • on a flick of a button, you can switch on or off the necessary flows on a site.
  • and the best part, I can run through the executed flow on an item to item basis.

Simply easy !!!

SharePoint

SharePoint Framework Developer Preview released

Microsoft released the developer preview for SharePoint Framework.

It’s all in Github now –¬†https://github.com/SharePoint/sp-dev-docs/wiki

If you are new to this, watch the official Microsoft statement to get some heads up ¬†–¬†https://blogs.office.com/2016/05/04/the-sharepoint-framework-an-open-and-connected-platform/

Also note that SharePoint Framework web parts are not supported for production use yet.

So just be ready guys !!!

Microsoft joins IFTTT like automation

Microsoft has introduced an exciting automation procedure called Microsoft Flow –¬†https://flow.microsoft.com/en-us/

You can relate this to IFTTT¬†where you can connect all of your best apps to achieve amazing things. Who wouldn’t like to light up their house during sunset ūüôā

Microsoft Flow allows you to connect your Office 365 accounts with services like Dropbox, Trello, Slack or Google Drive.

There are plenty of free templates which can get you started or you can create automation from blank.

Create your own recipes and enjoy ūüôā

AppFabric 1.1 error while installing SharePoint Server 2013 prerequisites

SharePoint 2013

While installing the SharePoint Server 2013 prerequisites, you see the following error in the event log and the setup log:

Product: AppFabric 1.1 for Windows Server — Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.¬† Action Env_PSModulePath_powershell_i, location: c:\Program Files\AppFabric 1.1 for Windows Server\Microsoft.ApplicationServer.InstallHelper.exe, command: powershell.exe “-command \”$str = [System.Environment]::GetEnvironmentVariable( \\\”PSModulePath\\\ “, [System.EnvironmentVariableTarget]::Machine); $str = $str+\\\”;c:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\\\”; c:\Windows\system32\setx.exe /M PSModulePath \\\”$str\\\”\ “” “C:\Users\Administrator\AppData\Local\Temp\AppServerSetup1_1_CustomActions(2014-5-15 11-08-45).log”

CAUSE
The PSModulePath environment variable is corrupted. There is a quotation mark at the end.

C:\Windows\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules;c:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules”

FIX
Delete the ending quotation mark and re-run the setup.

Original Official post here.

No more bimonthly CUs – July 2014 CU for SharePoint 2013 is out

SharePoint 2013

Microsoft has changed the plans for bi-monthly CUs. The CUs will be released on a monthly basis from now on. This means for all products that is being supported. Cool, eh!!

That means faster patches and updates to your products.

And so, the July 2014 CU for SharePoint 2013 has been released.

Visit the official blog for details.

Release Candidate for Visual Studio 2013 Update 3

The Release Candidate for Visual Studio 2013 Update 3, is now available for download

Some cool new features:

  • Multi-Device Hybrid Apps with¬†Apache Cordova‚ĄĘ.¬†We announced support for¬†multi-device development with Apache Cordova¬†at¬†TechEd¬†earlier this year. Update 3 continues our investments in tooling for iOS, Android and Windows through HTML/JavaScript/CSS and Cordova including improvements to installation and management and diagnostics.
  • Application Insights.¬†Application Insights, Microsoft‚Äôs service for monitoring production web sites and Windows Store and Phone apps, is now included in this update. Key enhancements in this release include polish to the account setup experience to create accounts directly in Azure without requiring a Visual Studio Online account as well as other enhancements from the Preview we published to the Visual Studio Gallery.
  • Visual Studio Graphics Analyzer.¬†Diagnosing DirectX rendering and performance issues is tricky and the¬†Visual Studio Graphics Diagnostics¬†features¬†help. In Update 3, we have enhanced the Graphics Analyzer to analyze graphics frames and to view the impact of shader code changes without re-running the app. You can easily configure capture options in Tools Options under¬†Graphics Diagnostics.
  • Managed memory dump analysis.¬†When analyzing managed memory dump files, you can now Go to Definition and Find All References¬†of the selected type. To learn more, check out the blog post on¬†.NET Memory Analysis.
  • CPU and Memory Usage tool.¬†The¬†CPU Usage tool¬†in the¬†Performance and Diagnostics hub¬†now enables you to navigate from a function name in the Call Tree to the definition of that function in the editor so that you can easily see the code that is using CPU in your application. We have also made¬†improvements to the Memory Usage tool¬†such as support for Win32 and WPF applications (.NET 4.0 and up on Windows 8.1) and the ability to force garbage collections in managed apps.
  • Multi-Monitor configuration with Windows Store App. When debugging a Windows Store app with a multi-monitor configuration, Visual Studio now remembers which monitor your app was last run on. Here are some¬†images to describe this experience.
  • CodeLens.¬†CodeLens, an editor productivity feature available in Visual Studio Ultimate, is now available to show authors and changes to files in Git repositories. If you use Git for source control and TFS for work item tracking, CodeLens work item indicators now provide information about work items associated with a method, or class.
  • ALL CAPS.¬†The change in our menus to use all capital letters was one of the areas about which we received a lot of feedback, so a while ago we added a¬†registry key¬†that disabled the ALL CAPS menus in Visual Studio 2012. To make the setting more discoverable and to enable it to remain set as you upgrade across Visual Studio versions, we have now added a Tools Options setting under the general Environment settings that lets you set your preferred menu bar styling. We also roam this setting so it‚Äôs available on all your devices.

Find the entire msdn blog with more details here.