Hello All,
I have written a JavaScript code to show the list alert on ribbon button click.
The alert is showing the Titles and Content Type Ids in the alert, I don't know
How to display the Content Type name instead of Content type ids????
please refer the following code snippet
function onQuerySucceeded(sender, args)
{
var listItemInfo = '';
var listItemEnumerator = collListItem.getEnumerator();
while (listItemEnumerator.moveNext())
{
var oListItem = listItemEnumerator.get_current();
listItemInfo += '\nID: ' + oListItem.get_id() +
'\nTitle: ' + oListItem.get_item('Title')+
'\nContent Type: ' + oListItem.get_item('ContentTypeId');
}
alert(listItemInfo.toString());
}Somebody please help me soon
In this line I tried to replace the parameter as ContentType instead of ContentTypeId but it failed!
'\nContent Type: ' + oListItem.get_item('ContentTypeId');