Related: How to retrieve a ListItem using the Javascript Client Object Model?
In my previous question I was able to successfully retrieve a basic value from a list item. My problem is that I am now trying to retrieve a value from a LookUp column get_item
no longer seems to work.
When I do an alert, I get [object Object]
instead of the value that is in there.
Code I am using:
function onSuccess(sender, args) {
alert(oDeptItem.get_item('Department'));
$('#contact').html(oDeptItem.get_item('Department'));
}
Should I be using something besides get_item
to values from LookUp columns?
get_lookupValue()
will also work with fields of Type "User"