Custom code to find a previous record

 2 Replies
 2 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Chesca
Veteran Member
Posts: 490
Veteran Member

    Hello, I am looking in the docs for Developers API only found for online programs. Is there a Lawson batch program you can point me to so I can see sample code to find a previous record. I am trying to find a record in HRHISTORY and then get the previous record. Thanks in advance for your time. 

    jaherb
    Veteran Member
    Posts: 164
    Veteran Member

      You can use 870-FIND-PREV-index.     But this has to be used in conjunction with the 850-FIND-NLT-index 

       

      This is described in the API manual.

      Woozy
      Veteran Member
      Posts: 709
      Veteran Member
        Hi bernfc10 - Just to expand on Jim's response, the code for navigating records is identical for online forms and batch programs, and it works the same way for every table. The only trick is that you must know the correct index to use to get the records returned in the sequence you expect. There are five different delivered indexes on the HRHISTORY table for you to choose from.

        Good Luck!
        Kelly Meade
        J. R. Simplot Company
        Boise, ID