locked
Getting latest add item from list. RRS feed

  • Question

  • Hi Guys,

    Been searching a lot on this question but not been able to find a solution to it even thou it's probably pretty simple:)

    The title sais it all.. I'm trying to get the latest added item to a list, been trying to do it with caml but can't see how to is there a simple way todo this?

    Just want the latest added item:)

     

    Sincerely

    Mads

     


    Tuesday, November 15, 2011 11:17 AM

Answers

  • In the CAML query, you need to use ORDER BY clause for Modified Date Desc then convert it into DATATABLE. Due to order by clause latest list item will come at index 0.
    Thanks, Amit Kumar, LinkedIn Profile ** My Blog
    • Marked as answer by Mads Jensen Tuesday, November 15, 2011 11:52 AM
    Tuesday, November 15, 2011 11:29 AM

All replies

  • In the CAML query, you need to use ORDER BY clause for Modified Date Desc then convert it into DATATABLE. Due to order by clause latest list item will come at index 0.
    Thanks, Amit Kumar, LinkedIn Profile ** My Blog
    • Marked as answer by Mads Jensen Tuesday, November 15, 2011 11:52 AM
    Tuesday, November 15, 2011 11:29 AM
  • Thanks.. will try that.. :)


    Mads Jensen
    Tuesday, November 15, 2011 11:52 AM