I need to retrieve List item column values with column names on item click. In SP2010, I have a XSL which calls the JavaScript. I have sent the list item id through the XSL into the JavaScript function.
context = new SP.ClientContext.get_current();
list = context.get_web().get_lists().getById(SP.ListOperation.Selection.getSelectedList());
pdfItem = list.getItemById(pdfItemID);
context.load(pdfItem);
context.executeQueryAsync(
function(sender, args) {
currentItemGUID = pdfItem.get_item('UniqueId');
},
function(sender, args) {
alert('Request Failed' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
}, "sp.js");
pdfItem.get_schemaXml();
didn't work