Friday, April 29, 2016

Speaking at Collab365 Summit 2016

In case if you do not know yet, Collab365 is huge this time. Its going to be Online from 10th to 12th May 2016 live from Microsoft HQ. If you are not registered yet, go and Register through the following link.

With 12 more days to go I thought of writing up something about the session I am yet do deliver. I will be speaking on "Workflow Manager Troubleshooting and Experience". This will include some of the experience we had by building a considerably large workflow management system and automating several business processes.

Friday, April 22, 2016

Getting over with the Lookup field unavailability issue

I have been facing this issue quite sometime when creating a lookup field of a SharePoint list. The main suspect was the title field. 

As we create a lookup to a list we tend to use the title field as the lookup field. Also we are tend to rename it in order to easily get the field with link and actions. 

For example, lets assume we rename the title field as "Name" with the "MasterList". Still its internal name will be Title.

Now in the child list, we need to lookup the "Master List". What we need to do is simply lookup that name field. We can simply do it through the C# code. But SharePoint creates this within the internal name. So it expects the Title field to be there. 

The best way to avoid is setting up internal name when creating the lookup. This prevents any issues with the lookup. 

If you are ever mistaken with that and have used the display name, you can simply go to the column settings and save it even without any changes. This is a tricky way to get over there.

Regardless of trick, its always good to use the internal name.

Friday, March 25, 2016

SharePoint PowerShell CSOM send email

In my previous article I explained about reading a SharePoint list using SharePoint PowerShell CSOM. In this article I will simply explain how to send an email using SharePoint PowerShell CSOM. 

In order to do this, you need to have the PowerShell CSOM setup done as I have explained in my previous article

An email can be simply sent using the SendMail method of the Utility class through the following code.

$email = [String[]]($email_receiver)
$emailProperties = New-Object Microsoft.SharePoint.Client.Utilities.EmailProperties
$emailProperties.To = $email
$emailProperties.Subject = $email_subject
$emailProperties.Body = $Body

Thursday, March 24, 2016

Client-side SharePoint PowerShell CSOM Read list

SharePoint PowerShell API provides the capability to connect to SharePoint 2010, 2013 and Online. The major advantage is that these can be run from a remote machine. The API is available in CodePlex.

I will focus on how to use the API and read a SharePoint list in this article.

First we need to download the source from CodePlex and extract it to a directory with necessary permissions. I am using 'C:\SPPS\Source' as the location for extraction.

Next we need to get a client context as in a normal CSOM.

Wednesday, March 16, 2016

C# CSOM SharePoint Online Authentication

SharePoint Online authentication via C#.NET Client-side Object Model is simplified with the SharePointOnlineCredentials class. Usage of this has been explained in Vardhaman Deshpande's blog. Usage of this within a Windows Phone app and exception handling is explained in this article.

I have attempted this within a console application as well as in a Windows Phone 8.1 App built using Visual Studio 2013 with Update 5. Basically it will work within Universal Apps.

  • When using the Console Application you need to reference the Microsoft.SharePoint.Client assembly.
  • In order to use this within the Windows Phone Application you need to reference the Microsoft.SharePoint.Client.Runtime assembly. 

Monday, February 29, 2016

Updating Distributed Logon Cache Settings on SharePoint Farm

As you may know, the distributed cache service on SharePoint 2013 helps improve the performance of many components such as,

  • Authentication
  • Newsfeeds
  • Security Trimming
  • Page load performances and etc...

There are different caches exist under the distributed cache service.

The Login Token Cache, which is named as DistributedLogonTokenCache stores security token issued by a Secure Token Service for use by any web server in the server farm. When any web server receives a request for a resource, can access the security token from the cache in order to authenticate and provide access to the resources.

Tuesday, February 16, 2016

Handling ETag value on SharePoint REST API Updates

ETag value is a part of the HTTP protocol that allows concurrency control and web cache validation. ETag is a broader topic when considered in general, but the main focus on this article is to discuss about REST API usage within SharePoint. 

ETag value is used whenever we make a POST request to a REST API endpoint. This is handled through the IF-Match request header. A sample request is displayed below.