0

I'm new to navision, and I need need to retrieve the previous record from a table because I need its records. So my question is : how can I retrieve the record that's just before the one I'm working with?

explanation : I'm seaching but can't really find what I need on google. I actually can't use .GET() as one of the fields in the primary key varies from record to record. what I need to do is calculate the difference in a field form a record and the previous e.g :

curent record : total : 150 previous : total : 100

what I need to do is to retrieve the total of the previous record in order to store the difference in another record. current record : difference : 50

bibo
  • 13
  • 1
  • 6
  • Make sure you post the code you already have. As suggested below, Rec.Next(-1) will move the current record one position back. This might interfere with your programming, so you have to show what you're doing if you need specific help. – 576i Jan 03 '14 at 12:56

1 Answers1

5

NEXT(-1)

Are you banned by google and microsoft simultaneously?

Mak Sim
  • 2,148
  • 19
  • 30
  • I'm seaching but can't really find what I need. I actually can't use get as one of the fields in the primary key varies from record to record. – bibo Dec 19 '13 at 14:27
  • `next(-1)` is what you looking for as I said – Mak Sim Dec 20 '13 at 07:01