How to open the closed web parts in SharePoint?


when we edit the webpart we can able to dropdown options like Close,Delete.
Some times user scared what would happen if they click on delete the webpart,so they will click on close.once click on close the webpart is gone!.
It is very surpriesed how to get back the closed webpart,we can able to see the web part maintenance page by appending with ?contents =1,but it wont usefull to get back the webpart again.

Solution:
Edit the page
Click on the add web part
In the top ribbon "Categories" last option "Closed Parts" click on it,we can able to see the closed web parts.Select the particular webpart and clik on Add as shown in the image below.

Now the closed  web part is appearing, our problem is resolved.


Set the masterpage using PowerShell in SharePoint

Set the masterpage using PowerShell in SharePoint
 Using Power Shell We can easily change our custom master page in our SharePoint site,once we prepare the script we can use for every time to change the master page.
 "Get-SPWeb" i used to get the site URL of the SharePoint in a variable.

We have two Properties to control the master Page settings, CustomMasterUrl and MasterUrl

Site Master Page         ---   CustomMasterUrl
System Master Page    ---   MasterUrl

Example:
$web = Get-SPWeb http://Dotnetsharepoint.com
$web.CustomMasterUrl = "/_catalogs/masterpage/Custom.master"
$web.MasterUrl = "/_catalogs/masterpage/Custom.master"
$web.Update()


If we have a site collection under a managed path like "sites”, we can change using 

“/sites/SITECOLLECTION/_catalogs/masterpage/Custom.master"
$web.CustomMasterUrl = "/sites/DotnetSharePoint/_catalogs/masterpage/Custom.master"
$web.MasterUrl = "/sites/DotnetSharePoint/_catalogs/masterpage/Custom.master


Sign as a different user in SharePoint 2013

As we know that Sign in as a different user option is not available in SharePoint 2013,It is needed for all developers,Testers,Administrators to log in with different account to test the customizations and aslo for checking permissions in a SharePoint sites,but we can also get this option by placing the code in

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\Welcome.ascx and open it SharePoint Designer,Visual Studio or Text Editor

Add the following sinpet befor having the element with id "ID_RequestAccess" as shown in Screenshot.


<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser"
 Text="<%$Resources:wss,personalactions_loginasdifferentuser%>"
 Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>"
 MenuGroupId="100"
 Sequence="100"
 UseShortId="true"
/>

Save and close.
Open the SharePoint Site we can able to see the Sign as a different user Option.

Sometimes we can also able to sign as a different user option in the browser for current sharepoint site,we can also use the following  URL in your browser.

http://<your site URL>/_layouts/closeConnection.aspx?loginasanotheruser=true

It will prompt the Popup with login,once we login it will redirect to the Site.

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Disable alerts in SharePoint

Disable alerts in SharePoint
Power shell will becoming easy to do our tasks,now we are doing how to disable and enable the alerts to the particular web application in SharePoint 2013/2010.

First we have to get the Web Application URL into a variable using the Property "Get-SPWebApplication" and using "AlertsEnabled" property we are trying to enable or disable the alerts using the Power Shell.


To Disable the alerts in the particular Web Application 

$weburl= Get-SPWebApplication "http://DotnetSharePoint/"
 $weburl.AlertsEnabled = $false
$weburl.Update()

 To Enable alerts in the  particular Web Application

$weburl= Get-SPWebApplication "http://DotnetSharePoint/"
$weburl.AlertsEnabled = $true
$weburl.Update()

Disable Alerts for List

In the same way some times we have to disable the alerts to the particular list there is no OOTB feature to disable the alerts to particular list,but we do it by using jquery/java script read the current page URL and list, disable the button in the ribbon.


How to hide and readonly columns in SharePoint list view using jquery

How to hide and readonly columns in SharePoint list view using jquery

Hide column in SharePoint List view 

To hide the column in custom list  new or view or edit form, we can use the below script to do the same. we need to edit the view or edit form page and add a content editor web part in that we have to include the below script to hide the column based on the requirement.

<script src="c:Jquery/jquery-1.11.0.min.js" type="text/javascript"></script>
<script type="text/javascript">

$(document).ready(function() {

//Contains (It will hide all the column which contains the word "Test")

 $("nobr:contains('Test')").closest('tr').hide();

//For single text alone
   $("input[title='Test']").closest('tr').hide();

</script> 

ReadOnly Column in SharePoint Editview

To make the column as read only in custom list  new or view or edit form, we can use the below script. we need to edit the view or edit form page and add a content editor web part in that we have to include the below script to make the column read only based on the requirement.

<script src="c:Jquery/jquery-1.11.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {

   $("input[title='Test']").attr('readonly', true);

</script> 


SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM