Change the Link and Text of "new item" in SharePoint list


How to change the Link and Text of "new item" in SharePoint list



Open site in SharePoint Designer, redirect to the list AllItem View Page and add the script under <PlaceHolderMain> tag.

Code-
<script type="text/javascript">
 $(document).ready(function(){
$("span:contains('new item')").text('New Entry');
$(".ms-heroCommandLink").attr('href','http://srs:port/site/SitePages/NewsAndEvents.aspx');
$(".ms-heroCommandLink").removeAttr("onclick");
 });
 </script>




Comments

Popular posts from this blog

Clear DataTable on button click

3D Charts in SharePoint

How to deal with special characters in rest filters