Tuesday, July 28, 2020

Orphaned features in SharePoint Farm

Leave a Comment
While working for a client project and deploying existing SharePoint solution face issue about orphaned features which gives error a feature with feature id XXXXX already exist in farm.

There are two solution either in feature set force install option or delete orphaned features using following powershell commands:

Get-SPFeature | ? {$_.Scope -eq $null}


$feature = Get-SPFeature | ? {$_.DisplayName -eq "FeatureToBeDeleted"}

$feature.Delete()


Read More

Saturday, July 18, 2020

Solution: Datepicker not working within updatepanel

Leave a Comment
Problem Statement:

Got chance to work on an existing project where in webform within update panel bootstrap datepicker control isn't working after callback/postback.

Solution:

Bind & Update datepicker controls at endRequest as follows:
$(function () {
   bindDatePickers(); // bind date picker on first page load
   Sys.WebForms.PageRequestManager.getInstance().add_endRequest(bindDatePickers); // bind date picker on every UpdatePanel refresh
});

function bindDatePickers() {
   $('#<%= txtStartDateFrom.ClientID%>').datepicker({
      uiLibrary: 'bootstrap4'
   });
   $('#<%= txtEndDateTo.ClientID%>').datepicker({
      uiLibrary: 'bootstrap4'
   });
 }
Read More