locked
How get Last modified Lead RRS feed

  • Question

  • How i get Last modified Lead using Javascript .........................


    Muhammad Sohail

    Wednesday, July 10, 2013 5:32 AM

Answers

  • Hi,

    When you query the leads using oData, just sort them on the "modified on" field descending. Then, in your HTTP respornse the "response[0]" is the last modified lead.



    My Weblog | My Website

    Wednesday, July 10, 2013 6:38 AM
    Moderator

All replies

  • Hi,

    When you query the leads using oData, just sort them on the "modified on" field descending. Then, in your HTTP respornse the "response[0]" is the last modified lead.



    My Weblog | My Website

    Wednesday, July 10, 2013 6:38 AM
    Moderator
  • I am using fetchxml using Denial Cai WebService Toolkit. is this correct...?or set the modified descending='true' 
    var fetchxml="<fetch mapping='logical'>"+
      "<entity name='lead'>"+
        "<attribute name='fullname' />"+
        "<attribute name='companyname' />"+
        "<attribute name='leadid' />"+
        "<attribute name='modifiedon' />"+
        "<order attribute='modifiedon' descending='false' />"+
        "<filter type='and'>"+
          "<condition attribute='statecode' operator='eq' value='0' />"+
        "</filter>"+
      "</entity>"+
    "</fetch>";


    Muhammad Sohail



    • Edited by sohail450 Wednesday, July 10, 2013 7:24 AM changing
    Wednesday, July 10, 2013 7:09 AM