Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:

Recycle Bin | MMS | ManagedVsCrawledProperties |

Monday, June 24, 2013

Query a workflow status using caml query:

Recently I have got a requirement like need to display the list of items which are all having the workflow status is “In Progress”.
I used caml query to filter the date based on workflow status: “In Progress” like below:
                          <FieldRef Name="MyWorkflowStatusName" />
                          <Value Type="WorkflowStatus">In Progress</Value>

Sunday, May 5, 2013

Add Button to sharepoint Ribbon control using visual studio 2012

In this task, you will add a custom action to the ribbon of all Document Libraries to launch the App.
  1. In Visual Studio, right click the HelloApp node and select AddØNew Item from the Context menu.
  2. In the New Item dialog, select Ribbon Custom Action.
  3. Name the item Launcher and click Add.

Saturday, May 4, 2013

Create Client Web Part to the App using visual studio 2012

In this task, you will add a Client Web Part and code it. This web part can be used on pages outside of the App to add functionality to the hosting SharePoint site.
  • Add a Client Web Part
    • In the Solution Explorer, right click the HelloApp project node and select Add-->New Item from the context menu.
    • In the Add New Item dialog, select Client Web Part.
    • Name the new item MyClientWebPart and click Add.

Saturday, April 20, 2013

Creating a Custom List using Visual studio 2012:

In this exercise, you will work through the basics of creating, testing and debugging a custom list type using the new list designer in Visual Studio 2012.
Download: custom list using VS2012.pdf 

1. Launch Visual Studio 2012.
2. Create a new SharePoint 2013 – Empty Project and name this new project CustomListSolution. Click OK on the New Project dialog.

Saturday, April 6, 2013

Show only login user's documents from document library

We can get the current logged user created documents only from the document library by following the below approaches:
  1. By using views.
  2. By using “Relevant documents” web part[OOWP]
Create a view and set the filter to filter by Created By or Modified By to use the [Me] value.

Tuesday, February 26, 2013

SharePoint 2013 databases during installation

The Configuration, Central Administration Content, and Content databases are the 3 databases that are automatically installed when you deploy SharePoint 2013.
Default database name when it is installed with the SharePoint Products Configuration Wizard

Monday, February 25, 2013

The service is unavailable in SharePoint: HTTP Error 503

I have changed the server administrator password and then restarted my machine. None of the site is working properly. Getting the below exception when I try to connect all of my SharePoint sites.  Here Administrator account is same as application pool account.
The application pool account password change functionality will work until unless if we do “IISReset” or restart the server.

Thursday, January 31, 2013

SharePoint 2013 Features/Highlights:

Apps in SharePoint 2013/office 365:
I have already covered about the features and benefits of introducing apps in my earlier posts. Please have a look into it.
  1. Overview of apps:
  2. Host Web Vs App web
  3. Get Host Web url 
  4. And some list Operations on SharePoint 2013/Office 365 sites

Create SharePoint list from Visal Studio2012:

In visual Studio 2012, separate tool called “Lists” introduced to create the lists and libraries in more convenient way. Here we can create both customizable and non-customizable lists.
  • Customizable lists means In addition to we can add/create existing/new fields, views etc. with it.
  • Non-customizable lists means it’s just create a new list.

Wednesday, January 23, 2013

List Operations on Sharepoint Apps: using ECMAScript

Below content will help to guide you on below things:
  1. How to get the host web url? 
  2. How to check whether the list exists or not? 
  3. How to create a list? 
  4. How to create fields? 
  5. How to add Items into the list? 
  6. How to Read items from the list?
Just replace the below code with your "app.js" file on office365(Napa tool) and see the magic.  Please give the required permission levels to do CRUD operations on the hosted site like read/write permissions otherwise get access denied error.

Thursday, January 17, 2013

Access denied on: Napa tool/ SharePoint 2013 apps

Recently I got the "Access Denied" issue when I try to access the lists data from the Visual Studio 2012 apps and Napa tool.

To get the access permissions from the Napa tool:
You will get the below popup up window once you clicked on "properties" tab[see below fig] and here you can give the access according to your functionality.

Check whether the list exists or not using ECMAScript

In SharePoint 2013 when you create any SharePoint Hosted App it will create separate web for the app you created. You can find it easily by verifying the URL at the browser.
1) SPHostUrl 2) SPAppWebUrl

Thursday, January 10, 2013

Get Host Web Url in SharePoint 2013/Office365 apps using JSOM

Get HostWeb URL through JavaScript object model:

Just do copy/paste the below code and execute it.

Note: The below shared code is 100% verified/executed.

Please reach the below post URL to get the hostweb url through REST service 


Set read level permisisons to the web


<p id="getHostWebURL"> </p>


'use strict';
var hostweburl, appweburl;
var website;

$(document).ready(function () {
    appweburl = window.location.protocol + "//" + + _spPageContextInfo.webServerRelativeUrl;
    hostweburl = _spPageContextInfo.siteAbsoluteUrl;

    //hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    //appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    var scriptbase = hostweburl + "/_layouts/15/";

    $.getScript(scriptbase + "SP.Runtime.js",
        function () {
            $.getScript(scriptbase + "SP.js", retrieveListItems);

// Function to retrieve a query string value.
// For production purposes you may want to use
// a library to handle the query string.
function getQueryStringParameter(paramToRetrieve) {
    var params =
    var strParams = "";
    for (var i = 0; i < params.length; i = i + 1) {
        var singleParam = params[i].split("=");
        if (singleParam[0] == paramToRetrieve)
            return singleParam[1];

function retrieveListItems() {
    var context = new SP.ClientContext(appweburl);
    var appContextSite = new SP.AppContextSite(context, hostweburl);
    website = appContextSite.get_web();
    context.executeQueryAsync(onGetWebSuccess, onGetWebFail);

    //the remaining code is omitted for clarity  

function onGetWebSuccess() {
    alert("calling" + website.get_title());
    $('#getHostWebURL').text("The title of the host web of this app is " + website.get_title());

function onGetWebFail(sender, args) {
    alert('Failed to get lists. Error:' + args.get_message());

How to: Create fields in sharepoint list using ECMAScript

By using below code we can create fields of different types using ECMAScript:
function createFields()
   currentcontext = new SP.ClientContext.get_current();
   web = clientContext.get_web();
   this.list = web.get_lists().getByTitle(‘ListName’);  
 //Add new fields to the list

//Single line of text Field
this.newColumn = oList.get_fields().addFieldAsXml("", true,
//Multi line of text Field
this.newColumn = oList.get_fields().addFieldAsXml("", true,
//Boolean Field
this.newColumn = oList.get_fields().addFieldAsXml("", true,

//Number Field
this.newColumn = oList.get_fields().addFieldAsXml("", true,

//DateTime Field
this.newColumn = oList.get_fields().addFieldAsXml("", true,

//People Picker Field
this.newColumn = oList.get_fields().addFieldAsXml("", true,

//Choice field(dropdown)
 this.newColumn= oList.get_fields().addFieldAsXml("ChoiceAChoiceAChoiceBChoiceCChoiceD", true, 
 currentcontext.executeQueryAsync(Function.createDelegate(this, this.onListCreateSuccess), Function.createDelegate(this, this.onQueryFailed));

function onListCreateSuccess(sender, args) {alert('sucess');
    alert("Field Name: " + this.newfield.get_title());
function onQueryFailed(sender, args) {
 alert('request failed ' + args.get_message() + '\n' + args.get_stackTrace());
Note: SP.Field.typeAsString Property is used to Gets or sets a value that specifies the type of the field.[From Msdn:]

Thursday, January 3, 2013

SharePoint Interview Questions and Answers: List vs Library

  1.  Difference between list and library?
  2.  New features introduced in sp2010 on Lists and Libraries compared to SP2007?
  3. List throttling?
  4. External List throttling?
  5. Column level validations?

Wednesday, January 2, 2013

Error occurred in deployment step 'Uninstall app for SharePoint":

I am facing the below issues regularly while deploying the SharePoint hosted apps to both either office 365 sites or SharePoint sites from the visual studio. So guys, please help me on it.

 Error occurred in deployment step 'Uninstall app for SharePoint': Only users who can View Pages can list Apps.
Error occurred in deployment step 'Uninstall app for SharePoint': The underlying connection was closed: An unexpected error occurred on a receive.
Error occurred in deployment step 'Uninstall app for SharePoint': The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
Error occurred in deployment step 'Uninstall app for SharePoint': Communication with the SharePoint server is canceled.