Friday, 14 March 2014

SharePoint List read managed Metadata
Use below javascript code to read Managed Metadata
function onSuccess(sender, args) {
var objlistEnumerator = objlistItems.getEnumerator();
while (objlistEnumerator.moveNext()) {
var objListItem = objlistEnumerator.get_current();
var i;
var cc=objListItem.get_item('MMDCol').get_count();
for (i=0;i<cc;i++){
alert(objListItem.get_item('MMDCol').get_item(i).$0_1);//Term
alert(objListItem.get_item('MMDCol').get_item(i).$1_1);//Guid
alert(objListItem.get_item('MMDCol').get_item(i).$2_1);//WSSID
}
}
}