Thursday, May 18, 2017

Interesting statistics (with supporting reference articles) illustrating how Digital Trends affect how people work

Interesting statistics illustrating how Digital Trends affect how people work!
  1. People working remotely has increased 4x from 1995 to 2015 -
  2. 90% of the world’s data was generated over the last 2 years -
  3. KRC Research 2013 Online Survey demonstrates that out off the 764 employees polled:
  4. Millennials will comprise 50% of US Workforce by 2050
  5. Generational Preferences of "Modern Collaboration Tools" at work:

Thursday, December 29, 2016

Tried creating a new variation label source site and got an error (with correlation id) when trying to access "Variation Labels" under Site Settings


OK! This one is a very strange error that  I encountered while setting up Translation sites in Office 365. While setting up a new source Translation Label site, the site was successfully provisioned but when I tried to access "Variation Labels" under Site Settings - got an Error page with correlation ID.



Upon further digging around, I found the culprit, a hidden library called "Variation Labels" where one of the columns "Title" should actually have a display name of "Label" but instead was still called "Title". If you enabled Publishing Feature on your Site Collection or created a Publishing Site you should be able to navigate to this library using  a URL like https://<your site collection URL>//Variation%20Labels/ - once you are in this library, click on Library Settings and ensure the Display Name of the "Title" column is "Label" (if not click on the column name and update the display name). Basically the different columns in this library should look like below:



Now try accessing "Variation Labels" under Site Settings and VOILA! there will be no exception and you will be able to see your variation label source site listed there.

Saturday, December 24, 2016

How to fix SSRS Page Count issue Page 1 of 2 ? where the page count is missing for some bizzare reason


SSRS Page Count issue "Page 1 of 2 ?", where the page count is missing is really due to a feature that was included since SQL Server 2008 Reporting Services called "On Demand Processing", which renders one page at a time to handle load and improve performance (especially for large reports)


You can fix this issue easily by adding a textbox to the report footer, set the textbox properties to "Hidden=true". Now set the textbox expression to "=Globals!TotalPages" (don't use quotes).

Voila!! Just like that when you refresh / re-run your report, it should now show the total number of pages in the SSRS report action bar

Thursday, November 03, 2016

How to resolve the "Loading" screen issue that constantly shows while using "Add an App" in sharepoint2013 (especially if you have built your own custom master page).

STEP 1) Ensure you add "DeltaPlaceHolderPageTitleInTitleArea" and "DeltaPlaceHolderLeftNavBar" to the tag below in Master page
<!--SPM:<SharePoint:SPClientIDGenerator runat="server" ServerControlID="DeltaPlaceHolderMain;DeltaPlaceHolderPageTitleInTitleArea;DeltaPlaceHolderUtilityContent;DeltaPlaceHolderLeftNavBar"/>-->


STEP 2) Add a Div hidden snippet just above the footer or at bottom of master page before the </body> end tag, with the following controls (cross check whether the following controls are not already present on the Master page - HINT: Find by the id name - if they exist dont re-add them)
   
<div style="display:none;">
 <!-- remove start and end tags below for DeltaPlaceHolderLeftNavBar and PlaceHolderLeftNavBar if already exists in master page -->
 <!--SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderLeftNavBar" BlockElement="true" CssClass="ms-core-navigation" role="navigation" runat="server">-->
 <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server">-->
 <!--SPM:</asp:ContentPlaceHolder>-->
 <!--SPM:</SharePoint:AjaxDelta>-->
 <!-- remove start and end tags below for DeltaPlaceHolderPageTitleInTitleArea and PlaceHolderPageTitleInTitleArea if already exists in master page -->
 <!--SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderPageTitleInTitleArea" runat="server">-->
 <!--SPM:<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">-->
 <!--SPM:</asp:ContentPlaceHolder>-->
 <!--SPM:</SharePoint:AjaxDelta>-->
</div>

Wednesday, December 09, 2015

How to get the current List GUID within your SharePoint Designer Workflow



You can get the Current List GUID by following the 4 simple steps below within your SharePoint Designer Workflow:

1) Use the "Extract substring from End of String" Action to copy 108 characters from the end of the Workflow Context: Workflow Status URL (Output to Variable:WorkflowStatusURLWithListGUID)


2) Use the "Extract substring from Start of String" Action to copy 44 characters from start of the WorkflowStatusURLWithListGUID (Output to Variable:ListGUID)

3) You can now use the Workflow Variable ListGUID within your custom actions or to construct dynamic strings where Current List GUID is required

For e.g. A Common use of the List GUID is when using workflows associated with SharePoint Calendar list and there is a requirement to export the SharePoint Event to *.ics file (so that the SharePoint Event can be added by user to his/her personal Outlook Calendar). To do this add a hyperlink to a URL similar to this within email Action:

<insert workflow context: current site url>/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List=<insert List GUID here>&CacheControl=1&ID=<insert current item id here>&Using=event.ics

Friday, August 07, 2015

Convert Word documents to PDF in bulk using SharePoint 2013 Word Automation Services - PowerShell Script


Find below the PowerShell script to save PDF version of Word documents in a SharePoint 2013 document library. Take note of the input parameters and corresponding value in the script below, so that you can set your own value for this script to run properly


# Uncomment the line below if running this script within Windows PowerShell ISE
#Add-PSSnapin Microsoft.SharePoint.PowerShell

# Input parameters for the script
# Input the SharePoint list Name - replace Shared Documents with your Document Library Name
$listUrl="Shared Documents"

# Get the Word Automation Service Proxy
$wasp = Get-SPServiceApplicationProxy | where { $_.TypeName -eq "Word Automation Services Proxy" }

#Create the Conversion job
$conversionJob = New-Object Microsoft.Office.Word.Server.Conversions.ConversionJob($wasp)

# Get the web url
# Input the SharePoint URL - replace sharepoint.test.com with your sharepoint site url
$web = Get-SPWeb "http://sharepoint.test.com/"

# Set the credentials to use when running the conversion job.
$conversionJob.UserToken = $web.CurrentUser.UserToken

# Conversion Job Name
$conversionJob.Name = "ConvertDOCXtoPDF1"
$conversionJob.Settings.OutputFormat = [Microsoft.Office.Word.Server.Conversions.SaveFormat]::PDF
$conversionJob.Settings.UpdateFields = $true
$conversionJob.Settings.OutputSaveBehavior = [Microsoft.Office.Word.Server.Conversions.SaveBehavior]::AlwaysOverwrite

#Get list
$list = $web.Lists[$listUrl]

# Replace the variable "SubFolderName" with your own folder name or remove SubFolders[..] if querying all files in root folder
foreach ($itm in $list.RootFolder.SubFolders["SubFolderName"].Files){
    # Replace .docx with .doc or other Word file extensions depending on the Word formats you are trying to convert
    if($itm.Name.ToLower().EndsWith(".docx") -eq $true) {
        Write-Host $($itm.ServerRelativeUrl)
        # Note the job below will convert all Word files to PDF and save it into the same location as where source Word document are. Modify code below to save to alternate location
        $conversionJob.AddFile($($web.Site.MakeFullUrl($itm.ServerRelativeUrl)), $($web.Site.MakeFullUrl($itm.ServerRelativeUrl).ToLower().Replace(".docx", ".pdf")))
               
    }
}
# Start the conversion job
$conversionJob.Start()

Saturday, June 06, 2015

Create a shortcut link to the "New Document" ribbon menu item to create a new document from a document template

The ribbon in SharePoint 2013 is useful but not user friendly if one is looking to create a document based on a pre-defined document template that is associated with a content type. Find below the code snippet that can be used to add a custom JQuery button or override existing script on button(s) to easily open a document based on a pre-defined Word template that is associated with the document library or content type:

Primary function

// Ensure that you replace the siteURL, docTemplateURL and docLibraryURL with your own values
// e.g. siteURL = http://intranet/
// e.g. docTemplateURL = http://intranet/doc%20ibrary/forms/template.docx
// e.g. docLibraryURL = http://intranet/doc%20ibrary
function createNewDocumentInstance(siteURL, docTemplateURL, docLibraryURL){

  var createDocumentURL = siteURL + "/_layouts/CreateNewDocument.aspx?id=" + docTemplateURL;

  // Invoke the internal SharePoint function to create a new document based on the document template
  createNewDocumentWithRedirect2(event, docTemplateURL, docLibraryURL, 'SharePoint.OpenDocuments', false, createDocumentURL, true, 0);

}

Possible Use (EXAMPLE Only)

function replaceAnchorTagOnClickEventAndHref(aTag, siteURL, docTemplateURL, docLibraryURL)
{
  aTag.click(function() {
   // Handle home page hyperlink update to open new document instance based on content type
    createNewDocumentInstance(siteURL, docTemplateURL, docLibraryURL);
    return false;
  }); // End onclick event for aTag to open document in New Window
 
  aTag.attr("href", "#");
}
$(document).ready(function() {

  // Find the anchor tag that needs to be set with the onclick event
  // e.g. if the anchor text is set to 'My New Document Hyperlink'
  var aTag = $(".link-item a:contains('My New Document Hyperlink')");

  if (aTag.length > 0) {
    replaceAnchorTagOnClickEventAndHref(aTag,
               "http://intranet/",
             "http://intranet/MyDocLibrary/Forms/TestContentType/TestContentTypeTemplate.docx",
            "http://intranet/MyDocLibrary/");
}

Thursday, March 12, 2015

How to configure Yammer or a specific Yammer group to accept the post updated via email right away without sending back a confirmation email to the sender?


You can configure it through the admin control panel in Yammer.

Admin > Design and Configuration > below Email Settings, uncheck ''Require all users in your network to confirm their posts made by email before posting'' > then Save.

 

Thursday, March 05, 2015

How to implement your custom breadcrumb navigation in SharePoint 2013


You can easily add breadcrumb navigation to your SharePoint 2013 pages by including the following tag (and setting the associated properties) called "SharePoint:ListSiteMapPath" in your master page. Please note that "SharePoint:ListSiteMapPath" has property “SiteMapProviders” which means we can specify more than one  provider object with one ListSiteMapPath control
 
Add following code snippet to your Master Page content place holder (you can chose any one depending on where you want to position the breadcrumb navigation on the page), for e.g. you can add to "PlaceHolderPageTitleInTitleArea"
 
<SharePoint:ListSiteMapPath

                runat="server"

                SiteMapProviders="SPSiteMapProvider,SPContentMapProvider"

                RenderCurrentNodeAsLink="false"

                CssClass="my-breadcrumb"

                NodeStyle-CssClass="my-breadcrumbLink"

                CurrentNodeStyle-CssClass="my-breadcrumbLinkCurrent"

                RootNodeStyle-CssClass="my-breadcrumbLinkRoot"   

                HideInteriorRootNodes="true"

                SkipLinkText=""

                PathSeparator="" />
 
Please note that you have to define your own stylesheets to implement the class "my-breadcrumb", "my-breadcrumbLink", "my-breadcrumbLinkCurrent" and "my-breadcrumbLinkRoot"

Thursday, February 12, 2015

How to resolve "Access is denied to the Secure Store Service." error in SharePoint 2013


You configure BCS and Secure Store Service correctly and then when trying to access the External list items, you may encounter a very strange error that reads something like this:
 
Unable to render the data. If the problem persists, contact your web server administrator.


Correlation ID:<some guid>

When you check your SharePoint error logs, you may notice some errors like this:

Secure Store Service ValidateCredentialClaims - Access Denied: Claims stored in the credentials did not match with the group claim for a group app. 

Secure Store Service           Secure Store                   GetRestrictedCredentials failed with the following exception: System.ServiceModel.FaultException`1[Microsoft.Office.SecureStoreService.Server.SecureStoreServiceFault]: Access is denied to the Secure Store Service. (Fault Detail is equal to Microsoft.Office.SecureStoreService.Server.SecureStoreServiceFault). <some guid>

The best way to resolve this issue is to check the configured Target Application ID, especially "Members - The users and groups that are mapped to the credentials defined for this Target Application." and ensure proper user or group is entered (by clicking the "Edit" option on the Target Application in under Secure Store Service Application Administration screen -  Central Admin > Application Management > Manage Service Applications > Secure Store Service and Edit the Target Application ID > Click on Next till you get to the third page and set the field "Members" with the proper users/groups who will access this External list from SharePoint - in my example I set to "All Users")