0

I am using the CSOM in javascript. I have a list which contains 3 text types and 2 date types. When I use:

  var listEnumerator = this.listItems.getEnumerator();
  var collection = listEnumerator.get_current();
  var linkTitle = collection.get_item('Start');
  alert(linkTitle);

For the text types it returns the correct information but when I input the name of the date type into get_item it doesn't even return an alert.

What is happening?

4
  • 1
    Perhaps you must call moveNext() first? In any case, open your browsers dev tool console (Usually F12), and check for errors Commented Mar 21, 2014 at 14:41
  • In my code there is move next is just didn't show it on here as didn't think it was relevant Commented Mar 21, 2014 at 14:46
  • 1
    Have you included those Date columns in your context.load()? context.load(listItems, "Include(Title, .....)"); Also you could add 'collection' variable into your console watch and see what all columns are being returned. Commented Mar 21, 2014 at 16:10
  • 1
    Make sure you are using the correct internal name for that 'start' column. Commented Mar 21, 2014 at 18:40

1 Answer 1

0

As Aveenav suggested see whether they are included in your Include(). Also verify whether your DEFAULT VIEW is having these columns included in list settings.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.