Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


Recycle Bin | MMS | ManagedVsCrawledProperties |

Friday, July 18, 2014

Sharepoint multiple lines of text column validation using JQuery

This post will help us on below validations:
  1. Required field validation
  2. clear the multiline of text value


//Get the multiline of text value
var multilineoftext = RTE_GetRichEditTextOnly("<%= txtComments.ClientID %>");

if (multilineoftext == '') {

alert("Multiline of text value is required");

}

//To clear multi line of text value

RTE_GetEditorDocument("<%=txtComments.ClientID %>").body.innerText = "";

sharepoint datetimecontrol validation using JQuery

This post helps us on below mentioned validations.
  1. Required validation.
  2. Selected date time cannot be less than current date


//To get the selected date time control value

var selectedDateTimeVal = $('input[id*="dtcDateTimeCtrl"]').val();

//Required validation

if (selectedDateTimeVal == '') {
  
alert("Date Time control field value is required");

}

else
{
 var date = new Array();

 var currDate = new Date();

 // Input date format : mm/dd/yyyy

 date = selectedDateTimeVal.split('/');

 var year = date[2];

 var month = date[1];

 var date = date[0];

 var selectedDate = month + "/" + date + "/" + year;

 var tarDate = new Date(selectedDate);

 var timeDiff = tarDate.getTime() - currDate.getTime();

 var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));

 if (parseInt(diffDays) < 0) {

  alert("Selected datetime value cannot be less than current date");

  }
}

Tuesday, July 15, 2014

Minimal master page in SharePoint 2013:

Step1: Select “Design Manager” and click on “Edit Master pages

 
Step2: Select “Create a minimal master page” and enter the minimal master page name “SampleMinimal” and click on “Ok” button.

 Step3: Open the minimal master page through SharePoint designer 2013 and add the below lines of code in “SampleMinimal.html”
Reason: “Design Manager” Bug in SharePoint 2013:
The actual issue is users are unable to create list/library after applying the minimal master page.
But when we are trying to create a new Document-library or List using "add an app" link it always shows "loading...” as shown in image and never ends.
<div style="display: none;">
<!--SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderLeftNavBar" BlockElement="true" runat="server">-->
<!--SPM:<asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server">-->
<!--SPM:</asp:ContentPlaceHolder>-->
<!--SPM:</SharePoint:AjaxDelta>-->
<!--SPM:<SharePoint:AjaxDelta id="DeltaPlaceHolderPageTitleInTitleArea" runat="server">-->
<!--SPM:<asp:ContentPlaceHolder id="PlaceHolderPageTitleInTitleArea" runat="server">-->
<!--SPM:</asp:ContentPlaceHolder>-->
<!--SPM:</SharePoint:AjaxDelta>-->
</div>
 

Step4: Publish the major of version to the “SampleMinimal” minimal master page.
Step5: Set this minimal master page as default master to the site.

Please let me know if faced any issues.