Monday, January 26, 2015

JSOM in SharePoint 2013 Application Page.

In this  post, I am talking about how to use the auto intellisense in the Visual Studio 2012  when you decided to use the JavaScript Object Model in an application page.

If you are familiar with SharePoint App model development using NAPA or Visual Studio, you might seen the required JS files from JSOM,

  • jquery-1.9.1.js
  • MicrosoftAjax.js
  • SP.Core.js"
  • SP.Runtime.js
  • SP.js
loads from the _layout folders but those are not useful when you wanted to use auto intellisense in the Visual Studio.
The hardcore developer knows how the intellisense are useful in the language,especially on Debugging.

There are so many namespaces,properties and methods are introduced in SP.JS,and we can identify them and leverage in our application using the auto intellisense feature of Visual Studio.


Follow these steps to achieve this,

Inside your layout folder in the Solution add the "Script" folder.
Create the _references.js file
Add the below JS files from the "Layout" folder under "Template" folder in 15 hive.

  • jquery-1.9.1.js
  • MicrosoftAjax.js
  • SP.Core.js
  • SP.Runtime.js
  • SP.js

Now in your application page under"PageHead" content area include the script tags and reference them using src property.

Now you are ready to go javascript function,and check the auto intellisense available for your objects.
But be ensure that _reference.js files looks like in the screen and added to your script folder inside your layout project folder.



Saturday, January 17, 2015

Remote event receiver in SharePoint 2013.

Quick glance on   Remote event receiver.

  • Remote event receiver can be attached to SharePoint list event , List item event.


When you add the remote event receiver item, Visual Studio 2012 adds the WCF service to your project as shown here.
After adding the remote event receiver template from the Visual studio to your project, a wcf service file .svc will be added to your web project and list type file will be added to your SharePoint App project.Click and choose the properties of the list type, select the desired events to be triggered on your SharePoint app.





  • Remote event triggered by web service (WCF) in which turn communicates with SharePoint and SharePoint send back to Access Control Service (Azure - AD or on premise AD) to get its token to be validated.


  • Once the token validates by the ACS,then remote event receiver starts to firing.
  • Remote Event receivers works only on Provider host not on SharePoint hosted app.


  • Remote event receiver can be debugged by configuring the Visual Studio 2012. On project select the SharePoint tab ,Check the "Enable remote event debugging".


To do this,you need to create the "Service Bus" service in Azure subscription. This is basically debug has to be run outside of your SharePoint environment and validate your Office 365 user authentication to trigger the event on SharePoint.


  • Remote event receiver supports synchronous and asynchronous using methods.

ProcessEvent (sync) method that takes SPRemoteEventProperties - Item Adding,deleting..etc parameter and
ProcessOneWayEvent (async) (SPRemoteEventProperties properties) - Item added,item deleted..

Tuesday, January 13, 2015

SharePoint 2013 exam retake policy

Second shot plan is back now . If you are not pass on first time you can retake this exam at no cost.
But this comes with certain condition. Retake policy is not applicable for MOS ( Microsoft Office Exams) and MTA (Microsoft Technology Associate) exams.

*You have to take this exam between January 5, 2015 and May 31, 2015 to avail this offer. 

Here is my aggregated information on retake exam policy on specific to SharePoint 2013.

Happy to know this retake policy available for SharePoint technologies .

MCSA in SharePoint technologies - You will be awarded the Microsoft Certified Solution Associate title upon successful completion of any of these exam.

Exam 70 - 346 -  Managing Office Identities and Requirements
Exam 70 - 347 - Enabling Office 365 Services 

Exam 70 -331 - Core Solutions of Microsoft SharePoint Server 2013 
Exam 70-332 - Advanced Solutions of Microsoft SharePoint Server 2013

This MCSA certification requires you to show continued ability to perform in your chosen solution area by completing a recertification exam every three years.

MCSD : Microsoft Certified Solution Developer.

Exam 70-480   - Programming in HTML5 with JavaScript and CSS3  
Exam 70-486  - Developing ASP.NET MVC Web Applications- 
Exam 70-488  - Developing Microsoft SharePoint Server 2013 Core Solutions 
Exam 70-489  -Developing Microsoft SharePoint Server 2013 Advanced Solutions 

This MCSD certification requires you to show continued ability to perform in your chosen solution area by completing a recertification exam every two years.


Keep learning ..Congrats for your exam.

Saturday, January 03, 2015

Adding Azure VM to Domain - Powershell

Its a few line of code to add your new VM as member computer of Active Directory in Windows Azure.



$domainName = "your domaincontroller name"
$username = "domain admin"
$password = "password"
Set-DnsClient -InterfaceAlias "Ethernet*" -ConnectionSpecificSuffix $domainName $securePassword =  ConvertTo-SecureString $password
    -AsPlainText
    -Force
$cred = New-Object System.Management.Automation.PSCredential($username, $securePassword)
Add-Computer -DomainName $domainName -Credential $cred -Restart –Force


save the above powershell script file (.ps1)

While creating the new virtual machine in Azure,on Virtual machine Configuration step,(3rd step) click on the "Custom Script" check box and choose the ps1 file from your local.
Adding azure vm to domain controller