I'm trying to create a function which retrieve all selected items in a list in a specific column however i keep getting following error:
items[i].get_item["Titel"] is not a function
However when i use
items[i].id
It returns all the ids of the selected items
How come it cant return by the column Titel?
Here is my code
function GetSelectedItemsID() {
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', function(){
var ctx = SP.ClientContext.get_current();
var items = SP.ListOperation.Selection.getSelectedItems(ctx);
var myItems = '';
var i;
for (i in items)
{
myItems += ' ' + items[i].get_item("Titel");
}
window.alert(myItems);
});
}