Get SharePoint list name by GUID
Get SharePoint list name by GUID in jQuery:
Use the below snippet code to get the name of list by using listGuid . To do so replace the below list guid with your SP list GUID.
var listGuid = "aa4774cf-oa71-83e4-6a67-01b53d5a7y6i2";//use your own SP site list guid
getlistNameByGUID(listGuid);
function getlistNameByGUID(guid) {
$.ajax({
url: _spPageContextInfo.siteAbsoluteUrl + "/_api/Web/Lists(guid'"+listGuid+"')",
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
console.log(data.d.Title);
},
error: function (e) {
console.log(e)
}
});
}
Output:
Company//list name of my sp site
Was this helpful? Comment you suggestions and share it with you friends and colleague.
Comments
Post a Comment