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
    – eirikb
    Mar 21 '14 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
    – dave
    Mar 21 '14 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.
    – Aveenav
    Mar 21 '14 at 16:10
  • 1
    Make sure you are using the correct internal name for that 'start' column.
    – Unnie
    Mar 21 '14 at 18:40
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.

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.