$renameWApp.Name="New Web Application Name"
$renameWApp.Update()

var clientContext =
SP.ClientContext.get_current();
var splist =
clientContext.get_web().get_lists().getByTitle("LISTNAME");
var splistItem = splist.getItemById(ID);
clientContext.load(splistItem);
// gets the item by attachment file name
clientContext.load(splistItem.get_attachmentFiles().getByFileName("FILENAME"));
clientContext.executeQueryAsync(Function.createDelegate(this,
Success), Function.createDelegate(this, Fail));
function Success(sender, args) {
var attachitem
= splistItem;
var total
= attachitem.get_attachmentFiles().get_count();
if (total
> 0) {
console.log(total
+ " file attachments"); // count will give the attachment count
}
}
function Fail(sender, args) {
//failed
function
}
}
That's All! SharePoint All the Way !!!

If you want this to be done for all the pages in teh site .. you must implement it via the master page ..
This would ensure that it is hidden from all the pages
we are goind to use jquery . Create a js file in teh layouts folder. and paste the following code in it .
$(document).ready(function(){
$('a[href$="/_layouts/15/viewlsts.aspx"]').each(function()
{ $(this).hide(); });
});
Now in the master page please refer to the js file as shown below in the layouts before the close of body tag.
"script type="text/javascript" src="_layouts/15/customjsfile.js"
There might be times when you really want to get the URL of the site collection within the master page of sharepoint 2013 sites.
well you can achieve it by using the below javascript line .
Inorder to add script in masterpage , we have to follow the conventional and well known method of the script tag inside the body of HTML.
now within the script tag just copy paste the following function
function getSiteCollectionsURL()
{
var sitecollectionURL = window.location.protocol + "//" + window.location.host +_spPageContextInfo.siteServerRelativeUrl
return sitecollectionURL;
}the function can be called from anywhere inside the masterpage according to your needs.. it will return the site collection url no matter where you are , ie , whether you are in the subsite or the site collection or the nested subsite.
Here is a small script that will enable you all to change a SharePoint Web Application name . We can use the following SharePoint Pow...