0

I have a requirement to retrieve the user email from created by column. I have tried with get_lookupValue(), but I got system object error message. Is there any solution to retrieve the user email from created by column using JavaScript?

Code attempted:

var Item=get_item('Author'); 
var user=Item.get_lookupValue();
  • Add code you are using, to help you better – Anuja Sep 17 '14 at 10:38
  • var Item=get_item('Author'); var user=Item.get_lookupValue(); – Gowtham Sep 17 '14 at 11:02
0

get_item('Author'); should return a user object. Simply use the get_email() method to get the user email:

var ctx = new SP.ClientContext();
var list = ctx.get_web().get_lists().getByTitle('My list');
var item = list.getItemById(1);
ctx.load(item);
ctx.executeQueryAsync(function(){
    alert(item.get_item('Author').get_email());
}, /* error handling here */ );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.