Custom code to find a previous record

Sort:
You are not authorized to post a reply.
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
        You are not authorized to post a reply.